News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_zhulien

Other Video Cards

Started by zhulien, 20:58, 11 May 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andycadley

Quote from: GUNHED on 11:01, 06 June 24No, just one single screen, but divided into two blocks. One from &0000 to &3FFF (shown on lower half) and the second from &C000 to &FFFF (shown on upper half).
By setting the CRTC addresses in a convenient way it's like to have the screen RAM from &C000.... crossing 0 .... to &3FFF. One block of 32 KB screen / Video RAM.
However, some CRTC values need to be adjusted by interrupt.

On a Plus you can also achieve the same thing using the Screen Split Register in the ASIC, then you don't need any interrupt at all.

Quote from: Prodatron on 13:00, 06 June 24
Quote from: zhulien on 12:29, 06 June 24what is the benefit of IM2 in this case?
The benefit on an unexpanded CPC is, that you can put the interrupt handler to another address than #0038.
IIRC to be safe you fill a 256byte aligned 256byte range with 128x the 16bit address of the handler and set the I-register to the high part of the address of this 256byte range.

Strictly it needs to be a table of 257 identical bytes, the first 256 of which must all be on the same page. The I register then holds the high byte of that page. This also means your interrupt routine needs to start on an address where both low and high bytes match, e.g. #FEFE

The reason for that is you can't guarantee the value put on the bus is an even number, so if you try putting 16-bit addresses the Z80 may end up reading from an odd address (which will effectively transpose the low and high bytes of the vector).

IIRC, the Plus is mostly guaranteed to put an even address on the bus (external hardware notwithstanding) because it was supposed to support vectored interrupts and, even though they're broken, it's more consistent about putting a valid value on the bus in response to an interrupt.

GUNHED

#26
Yes, on the 6128plus very nice things can be done.  :)

IM2: Exactly, for FutureOS for example I use a table from &BD00 to &BE00 (inclusive) and they all contain the value &FC, so regular (or undefined) all jump to &FCFC. This is the enty point for IM2 management.
Now to support 6128plus, PlayCity, Albireo (or other IM2 compatible expansions like ECB expander card) the target address for specific interrupt management will be placed in the 257 byte table.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

GUNHED

Quote from: zhulien on 12:29, 06 June 24i was thinking of how to do something similar, if game code is in the 2nd 64kb bank, then the main bank can be for support routines for banking, fast transfer of data between banks, buffers etc, and 32kb video RAM (I was thinking for full overscan).

If you choose 0000-3fff and c000-ffff, then i am guessing your code must be in the 2nd bank if you are using interrupts and have them disabled at times you need to draw video in the main bank?

what is the benefit of IM2 in this case?

Interrupts are active all the time, some code is between &8000 and &B7FF. And all other code can be banked in between &4000 and &7FFF.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

GUNHED

Quote from: Prodatron on 13:00, 06 June 24
Quote from: zhulien on 12:29, 06 June 24what is the benefit of IM2 in this case?
The benefit on an unexpanded CPC is, that you can put the interrupt handler to another address than #0038.
IIRC to be safe you fill a 256byte aligned 256byte range with 128x the 16bit address of the handler and set the I-register to the high part of the address of this 256byte range.
It works the same way with expanded an heavily expanded CPCs and 6128plus. Basically what AndiCadley said. 
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod