rupture

Started by arnoldemu, 16:01, 13 October 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

I attempted to explain how the crtc registers work and what rupture is.

I think it's explained elsewhere too, but this document may help.

I'm going to add info about vertical h/w scrolling using R5 to it tomorrow.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

VincentGR

Thank you.

Arnaud

Very interesting, and with a SDCC code sample it will better  :D

TFM

#3
No, better ASM examples...I will contribut later. Mean while.... (C is too slow).


There is the sentence:


"When the start of the vertical sync is seen by the monitor it starts the next line. This means border is effectively split between top and bottom of the display."


Shouldn't it tell "page" instead of "line" ?


TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

@TFM: Thank you I will correct that.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

My pleasure, great document!!! Thanks a lot!!!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Another update.

Added:
- changing HSYNC position and why the screen moves left/right
- changing VSYNC position and why the screen moves up/down
- overscan 32KB and what it looks like with hsync/vsync etc.
- smooth vertical R5 scrolling

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

I'm hoping the diagrams are helping people to understand how the registers work.
Hopefully, some people are going "ah, now I understand".
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

majikeyric

Thanks you very much! It's great!

TFM

A question of probably general interest. How soon does a change in R5 get realized?


It's probably not immediately. Is it after the end of every rupture block and after a VSYNC?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM on 21:40, 14 October 15
A question of probably general interest. How soon does a change in R5 get realized?


It's probably not immediately. Is it after the end of every rupture block and after a VSYNC?
At the end of every rupture block only.

It is added to the end of the block if it's not set to 0.

You can write the register any time before the end of the block.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

#11
Cool! Thanks! So the best idea is probably the example you did show, using 3 blocks:

1. One small block
2. R5 change (X)
3. Big block - will be soft scrolled
4. R5 change (8-X)
5. One small block
6. VSYNC
7. start over at 1


Using two blocks makes them probably different, sad that.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

At the weekend I wondered when the first cpc game with rupture was made.

I found some interesting things (or maybe re-found) that could explain some things:

ACU, Jan 1988.
ZZKJ has an article about 32K screen. He mentions how to do rupture but I think he has experimented and doesn't fully know what is going on.

"..However, by sending an illegally large value to register 7 for the top frame the 6845 gets confused into omitting frame flyback, which gets rid of this band, and it just joins the top screen into the bottom if you position them correctly...

In a later ACU in july of that year there is an article for rim runner:

"
Although the Amstrad has a hardware scroll, it is useless here because it affects the whole screen. I needed to scroll different areas of the screen by different amounts, so what's the fastest software scroll?
Well, two articles in ACU, one by ZZKJ and one by Justin, suggested two possible approaches.
In his article on 32-row text screens on the Amstrad (January 1988), ZZKJ showed how to fool the 6845 video chip into displaying two separate screens together at once. OK, thought I, let's try giving different hardware offsets to the two screen sections. Then part of the screen will hardware scroll and the rest won't, right?
Wrong. This is one straw too many for the poor 6845, which promptly has a nervous breakdown. I couldn't find any combination of register values which worked consistently on one machine, let alone on different Amstrads. It meant giong back to the drawing board...
Justin's Scroll (June 1987) is the one I used. This employs the Z80 block move instruction to shunt all the screen data along, but uses a whole sequence of single LDI instructions (16 clock cycles per byte shifted) instead of a single LDIR (21 clocks per byte)."

There appear to be only two games that have rupture before 1988:

"Energy Warrior" which is not true rupture, the vsync happens twice.

"Mission Genocide" which is true rupture.

I wonder if the ACU article was the inspiration for people to try it. Does anyone know of any other articles in amstrad magazines that mention the rupture method?




My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

roudoudou

use RASM, the best assembler ever made :p

I will survive

AMSDOS


Quote from: arnoldemu on 15:52, 12 December 16
"Mission Genocide" which is true rupture.


Paul Shirley strikes again!


Quote from: arnoldemu
I wonder if the ACU article was the inspiration for people to try it. Does anyone know of any other articles in amstrad magazines that mention the rupture method?


AA ran a short 5 part series called "Naked Video", it began in AA51 and wrapping up in issue 59, with articles published in Issues 53,54 & 56, but I'm not sure if rupture was covered in that series. The last part in Issue 59 deals with splitting screen modes, but that's different to rupture isn't it?

* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

andycadley


Quote from: AMSDOS on 02:13, 13 December 16
AA ran a short 5 part series called "Naked Video", it began in AA51 and wrapping up in issue 59, with articles published in Issues 53,54 & 56, but I'm not sure if rupture was covered in that series. The last part in Issue 59 deals with splitting screen modes, but that's different to rupture isn't it?
No, it's a nice intro to using some simple CRTC/GA effects but doesn't go deep enough to touch upon ideas like rupture splitting. Although weirdly it does have a box out in issue 55 on the interlace and skew register, which is probably the least usable due to how the effect varies between CRTC types (not something it ever mentions either).

AMSDOS

Quote from: andycadley on 09:16, 13 December 16
No, it's a nice intro to using some simple CRTC/GA effects but doesn't go deep enough to touch upon ideas like rupture splitting. Although weirdly it does have a box out in issue 55 on the interlace and skew register, which is probably the least usable due to how the effect varies between CRTC types (not something it ever mentions either).


Thanks. I should of realised that the Naked Video started Late '89 and into 1990, so by then more games would of been making use of the rupture effect I presume.

* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

arnoldemu

More analysis and there does seem to be some use of rupture in 1987, so I'm wondering if there was something else that pushed it.

The Jan88 issue of ACU would have been available at least 1 month before publication to those who subscribed. So Dec 87.

It seems Firebird used it a lot.

Oh, and looking at some of their games, it seems the code is similar enough that I would say that it was derived.

http://www.cpc-power.com/index.php?page=detail&num=1953

The rupture code is close to Mission Genocide with some tweaks for a different sized panel.
The code is so close in places they either shared the code within Firebird, or they took the code and modified it for themselves.


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

AMSDOS

Quote from: arnoldemu on 11:23, 15 December 16
More analysis and there does seem to be some use of rupture in 1987, so I'm wondering if there was something else that pushed it.

The Jan88 issue of ACU would have been available at least 1 month before publication to those who subscribed. So Dec 87.

It seems Firebird used it a lot.

Oh, and looking at some of their games, it seems the code is similar enough that I would say that it was derived.

http://www.cpc-power.com/index.php?page=detail&num=1953

The rupture code is close to Mission Genocide with some tweaks for a different sized panel.
The code is so close in places they either shared the code within Firebird, or they took the code and modified it for themselves.


I guess it could be something as a Type-in, Splatch has some Raster effects, all written in Assembly though. Would a Rupture effect have to be coded though Assembly, or could BASIC access of Ports be able to create this effect?

* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AHack

I've implemented a rupture where I have a static section at the top, in the middle I have a scrolling section, and at the bottom I have a static section. This all works well after looking at an example asm file and working out what it all does and how it works.


But from what I have learnt, the very nature of doing overscan seems to remove top and bottom borders because you have to make each rupture add up to 312 lines to keep the timings happy to 50htz. So my question is what is the best way to add the borders back in?

Axelay

Hi @AHack


There was some discussion on screen splitting and R3 scrolling a while back here.  I don't know if there is a better discussion on it somewhere, but I remember that one because it's where my understanding really came together on screen splitting.


And in case you might be interested, there's also a game I did a while ago with a screen split and R3 scrolling with commented source code available, which you can find here.

AHack

Thanks Axelay,


That thread was useful to improve my understanding more.


When I initially tried coding the splits it was working fine for testing. Then I re-adjusted things to get what I wanted for my game idea and then it all went wrong. Then I worked out I needed to do a software delay to get r4 to work correctly on one of the INTS. I did that without really understanding why but that thread hepled bigtime for that.


I've decided to keep the overscan aspect of this technique in for my game for a little sacrifice to memory usage, so no borders top and bottom. My screen (mode 0) is 160 by the height of the monitor.


I have not bothered with interrupts to do this and instead I'm using the Halt way... the reason is because I need to race the beam and interrupts will complicate that. Anyway, all good fun playing around coding the Amstrad again :)

Ast

_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

AHack

Thank you! Another wealth of information. I'm having fun messing around with all this stuff again :)

keith56

Thanks for all the useful information here!

There's also a simple Rupture splitscreen example here on CPC-Live which I don't think anyone's mentioned yet:

http://cpctech.cpc-live.com/source/split.html
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Powered by SMFPacks Menu Editor Mod