News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Interrupt positions with various sized screens

Started by arnoldemu, 11:47, 31 December 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

For fun and reference is attached a disk which shows the CPCs interrupt positions on-screen in relation to the pixels. 

It is meant as a reference for designers, artists and for anyone starting coding on the CPC.

With this you can for example decide where to switch modes or palettes. The interrupt positions here are the defaults where they've not been delayed.

For example in the attached image changing the mode to 1 at the start of the bright cyan region and then to mode 0 at the start of the black region would allow an easy mode 1 hud of 4 chars in height with the remainder as mode 0. 

If for example we wanted to have a mode 1 screen with a mode 1 hud starting at 'T' we would use the interrupt starting with the dark green region but then we'd need to 'burn' cycles to get to the T position.

The interrupt positions in relation to the pixels can be adjusted by moving the screen up and down.

The following screen sizes are shown:
* normal (40 x 25)
* tall (32x32)
* Spectrum (32x24)
* overscan '32kb method' 48x34.


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

McArti0

macro LD_BC_HL
   ld b,h:ld c,l
mend

org #B941

jp custom_int


org #BE80
.pushbc
dw 0
.color
db #54

org #8000
.start
ld hl,return_INT-start
add hl,de
LD_BC_HL ; return_int offset
ld hl,reloc-start
add hl,de ;reloc offset


ld (hl),c
inc hl
ld (hl),b

di

ld hl,custom_int-start
add hl,de
LD A,#c3
ld (#b941),A
LD (#b942),HL

ret

.custom_int ;***********
ld (pushbc),bc

reloc equ $+1
ld bc,return_INT
push bc

ld bc,&7f10
out (c),c

intcolor equ $+1
ld c,&5F
out (c),c

ld bc,(pushbc)

.end_custom_int
EX AF,AF'
JP C,#B978
JP #B945

.return_INT
push bc

ld bc,&7f10
out (c),c

push af
;color equ $+1
ld a,(color)
out (c),a

ld a,(&b7f6)
inc a
jr z,aa
ld a,(&b7d4)
set 6,a
ld (color),a
pop af
pop bc
ret
.aa
ld a,(&b7e5)
set 6,a
ld (color),a
pop af
pop bc
ret

print "CUSTOM_INT:$custom_int INTCOLOR:$intcolor"

interrupt bars
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
One chip drver for 512kB extRAM 6128
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

McArti0

CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
One chip drver for 512kB extRAM 6128
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

GUNHED

Using real cooperative multitasking it all looks a bit different...
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

arnoldemu

Quote from: McArti0 on 23:35, 31 December 24Real CPC like in WinAPE.
Nice and it shows a method to keep firmware interrupts running but be the first to handle the interrupt. I think the thicker bar shows where the keyboard is being read.

Another example which allows us to get in ahead of the firmware ints: https://www.cpcwiki.eu/forum/programming/asm-source-code/msg13478/#msg13478
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Powered by SMFPacks Menu Editor Mod