Why didn't anyone remind me that it would be nice if the new front-end worked on NTSC as well...
Answers on a postcard, please.
Rise and Fall of Paradroid Redux
Why didn't anyone remind me that it would be nice if the new front-end worked on NTSC as well...
Answers on a postcard, please.
After reading about Mike Dailly's raster split trouble I decided to write a bit about how the top split is done in Paradroid Redux.
There are three things to do when playing area begins:
Nothing explains code better than source, so here it is. Only relevant parts are shown, and for clarity I've removed all assembly directives which were there to make sure branches don't span page boundaries (which would add one cycle to the branch).
IRQ at line 95, prepare for split
...
lda #$10
ora _vScroll
sta $d011
cmp #$16
bne .057
; special case for bad line
lda #<Irq_116
sta $fffe
lda _d018+1
sta _d018b+1
lda _d021+1
sta _d021b+1
lda #116
bne .x1 ; jmp
; normal case
.057 lda #<Irq_118
sta $fffe
lda #118
.x1 sta $d012
...
;----------------------------------------------------------------
; this one used when ($d011 & 7) = 6, stuffs
; d018/d021 as fast as possible at raster 118
subroutine
Irq_116 pha
sty .yr+1
cld
lda #<Irq_118b
sta $fffe
lda #>Irq_118b
sta $ffff
lda #118
sta $d012
inc $d019
; 118/15 = 7.8 so this one is executed 8 times
sbc #15
bcs *-2 ; 8*5-1=39 cycles
; preload registers and execute 2-cycle
; instuctions until next IRQ happens
_d018b lda #scr_GAME
_d021b ldy #0
cli
repeat 16
cli ; 32 cycles wasted
repend
; now is the time to write registers, we always enter
; via interrupt as the above code never runs this far
Irq_118b
sta $d018
sty $d021
; clean up stack and continue normal IRQ code
pla ; flags
pla ; PC lo
pla ; PC hi, always != 0
bne .irq0 ; jmp
;----------------------------------------------------------------
; normal case, use timer value to stabilize
; raster regardless of sprites over the split
Irq_118
pha
sty .yr+1
cld
lda $dc04 ; [1,15] ([2,15] if NTSC/Drean)
eor #$0f ; [14,0] ([13,0])
sta .j3+1
.j3 bpl *+2 ; jump into the delay code
; entering at offset 0 delays 16 cycles,
; entering at offset 14 delays 2 cycles
;
; OP_CMP_IMM is opcode for CMP #immediate (2 cycles),
; OP_CMP_ZP is opcode for COM $zeropage (3 cycles)
cmp #OP_CMP_IMM
cmp #OP_CMP_IMM
cmp #OP_CMP_IMM
cmp #OP_CMP_IMM
cmp #OP_CMP_IMM
cmp #OP_CMP_IMM
cmp #OP_CMP_ZP
nop
_d021 ldy #0
_d018 lda #scr_GAME
sta $d018
sty $d021
; continue with interrupt
.irq0 ...
To honor the sun I give you a new release - or two releases actually.
My plan was to build an unified version with both graphic sets held in memory all the time, but that didn't happen due lack of memory. Too bad, having different graphics on different decks would have given some more variety to the game.
I did manage to fit all necessary data into memory, but as I had to
EOR fonts together there was no way to swap between them without temporary 2 KB buffer. You really can't unpack LZ data and EOR it simultaneously, which took me way too long to realize.
While it would have been possible to do the EOR in two passes with the 1 KB buffer I do have, I didn't bother with that as I would have to drop dual graphics as soon as I need the memory back anyway.
Oh, I did fix one single pixel bug in the hires font too :)
Edit: I also added single pixel bug into Metal Edition - when you clear deck the first time, there may be extra pixel in the background star. That one is gone as soon as you move a bit vertically, so I won't do another build just to fix it.
For those too busy to read any further, click here.
Important: archive updated January 2nd, you need to delete old high score file as it's not compatible any more.
Due to some rather unfortunate events in the family I haven't had as much time for PR as I would have liked to, so there are no major changes. Minor changes include:
Changes which didn't make it to this version:
Even if my time for coding has been limited, that doesn't mean that I haven't thought about the game during the slow times at work. I'm positive that the actual playing area can be enlarged by t least one character row. With C128 I think it might be possible to do two or three additional rows without the game slowing down. We'll see if I ever have time for that.
Too little time for anything major (yet!) but scoring and subgame have seen some little changes.