Author Topic: rupture  (Read 5585 times)

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
rupture
« on: 16:01, 13 October 15 »
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.


Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 1.278
  • Country: gr
    • Parts from the past.
  • Liked: 774
  • Likes Given: 1877
Re: rupture
« Reply #1 on: 19:53, 13 October 15 »
Thank you.
Visit my BBS (Telnet) : flashbackbbs.sytes.net:6502
http://loaderror.eu/
Amiga 1200 Black Project

Offline Arnaud

  • Supporter
  • 6128 Plus
  • *
  • Posts: 646
  • Country: fr
  • Liked: 557
  • Likes Given: 1167
Re: rupture
« Reply #2 on: 20:31, 13 October 15 »
Very interesting, and with a SDCC code sample it will better  :D

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1982
  • Likes Given: 4650
Re: rupture
« Reply #3 on: 21:30, 13 October 15 »
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" ?


« Last Edit: 21:37, 13 October 15 by TFM »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: rupture
« Reply #4 on: 21:49, 13 October 15 »
@TFM: Thank you I will correct that.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1982
  • Likes Given: 4650
Re: rupture
« Reply #5 on: 22:10, 13 October 15 »
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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: rupture
« Reply #6 on: 15:52, 14 October 15 »
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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: rupture
« Reply #7 on: 20:00, 14 October 15 »
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

Offline majikeyric

  • CPC464
  • **
  • Posts: 14
  • Country: fr
    • Majikeyric's WebSite
  • Liked: 9
  • Likes Given: 7
Re: rupture
« Reply #8 on: 20:22, 14 October 15 »
Thanks you very much! It's great!

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1982
  • Likes Given: 4650
Re: rupture
« Reply #9 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?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: rupture
« Reply #10 on: 21:47, 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

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1982
  • Likes Given: 4650
Re: rupture
« Reply #11 on: 22:35, 14 October 15 »
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.

« Last Edit: 22:49, 14 October 15 by TFM »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: rupture
« Reply #12 on: 15:52, 12 December 16 »
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

Online roudoudou

  • 6128 Plus
  • ******
  • Posts: 890
  • Country: fr
    • urban exploration
  • Liked: 1186
  • Likes Given: 736
Re: rupture
« Reply #13 on: 21:25, 12 December 16 »
...
use RASM, the best assembler ever made :p

I will survive

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: rupture
« Reply #14 on: 02:13, 13 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

Offline andycadley

  • Supporter
  • 6128 Plus
  • *
  • Posts: 913
  • Liked: 445
  • Likes Given: 73
Re: rupture
« Reply #15 on: 09:16, 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).

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: rupture
« Reply #16 on: 11:01, 15 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

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2275
  • Likes Given: 3478
Re: rupture
« Reply #17 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.


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

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.914
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 1122
  • Likes Given: 1898
Re: rupture
« Reply #18 on: 12:28, 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

Offline AHack

  • CPC664
  • ***
  • Posts: 91
  • Country: au
  • Liked: 182
  • Likes Given: 22
Re: rupture
« Reply #19 on: 17:36, 18 March 19 »
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?

Offline Axelay

  • 6128 Plus
  • ******
  • Posts: 585
  • Country: au
  • Liked: 383
  • Likes Given: 87
Re: rupture
« Reply #20 on: 03:44, 20 March 19 »
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.

Offline AHack

  • CPC664
  • ***
  • Posts: 91
  • Country: au
  • Liked: 182
  • Likes Given: 22
Re: rupture
« Reply #21 on: 05:37, 20 March 19 »
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 :)

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 1.101
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 1001
  • Likes Given: 741
Re: rupture
« Reply #22 on: 19:24, 20 March 19 »
@AHack  You could also add http://amstradplus.forumforever.com/t319-Programmez-vos-ruptures-facilement.htm in your bookmark !! This might help you...
_____________________

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


Amstrad Plus French Forum

All friends are welcomed !

Offline AHack

  • CPC664
  • ***
  • Posts: 91
  • Country: au
  • Liked: 182
  • Likes Given: 22
Re: rupture
« Reply #23 on: 19:31, 20 March 19 »
Thank you! Another wealth of information. I'm having fun messing around with all this stuff again :)

Offline keith56

  • ちび悪魔!
  • Supporter
  • 6128 Plus
  • *
  • Posts: 572
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akumas Assembly tutorials
  • Liked: 928
  • Likes Given: 211
Re: rupture
« Reply #24 on: 15:04, 12 May 19 »
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 Livestreaming Channel: ChibiAkimas Live