|
Post by VDC 8x2 on Jun 5, 2014 4:17:13 GMT
I know it was answered before but for the sake of new people.
How did risen from oblivion do its raster effects?
|
|
|
Post by VDC 8x2 on Jun 19, 2014 7:45:04 GMT
Some code I pulled out of risen from oblivion.
*=$fe11 start sei lda #$20 ;wait for vblank and $d600 beq *-5
lda #>fe31 ;irq vector sta $fffe lda #>$fe31 sta $ffff
lda #$20 ;wait for screen and $d600 bne *-5 lda #$19 ;set cia1 clock sta $dc0e cli rts
irqfe31 pha lda $dc0d ;clear irq source lda #$20 and $d600 bne *-5 ;wait for screen lda #$19 sta $dc0e ;set cia1 clock txa pha ;push x on the stack tya pha ;push y on the stack jsr $e003 pla tay ;pull y from the stack pla tax ;pull x from the stack pla ;pull a from the stack rti ;return from the irq
|
|
|
Post by hydrophilic on Jun 19, 2014 10:53:54 GMT
Thanks for taking the time... I did notice an error in that:
lda #>fe31 ;irq vector sta $fffe lda #>$fe31 sta $ffff
which should instead read:
lda #<fe31 ;irq vector sta $fffe lda #>$fe31 sta $ffff Notice the low-byte and high-byte operators. That is a very trivial detail to me... more important is this:
lda #$20 ;wait for screen and $d600 bne *-5
Now that seems like the crap you would see by a lame programmer; I think most of us would agree RFOB is pretty cool, so this really surprises me! I mean, wouldn't this be better?
lda #$20 bit $d600 ;wait for screen bne *-3 ...
|
|
|
Post by VDC 8x2 on Jun 19, 2014 20:25:05 GMT
It would not be better because the code is waiting for the vblank bit? Am I wrong? does bit change the A reg?
yeah the bitwise stuff was a typo on my part.
|
|
|
Post by VDC 8x2 on Jun 19, 2014 20:32:36 GMT
Never mind, I see what you mean. bit does the and thing
|
|
|
Post by VDC 8x2 on Jun 19, 2014 20:34:36 GMT
Looking into its code to look for ideas on doing a split screen with graphics and text on vdc.
|
|