Flip mode
This is probably an enhancement also.
Flip mode does not work, and drawing sprites in flip mode displays garbage on screen.
When you will want to add the feature, this test ROM may help, it does only 3 things:
- initial: display a sprite
- after joystick press: flip the screen
- after another joystick press: redisplay the sprite in another position flip.zip
This is the sourcecode for Flip in BLL kit (@42BS will explain better than me)
` ; ; c: Flip() ; extern char * ScreenBuffer; ; ; Switch right/left ; global _Flip
xref _viddma,_sprsys
xrefzp __viddma,__sprsys
xrefzp _ScreenBuffer,_RenderBuffer
_Flip: lda __sprsys ; load from RAM-shadow eor #8 sta __sprsys sta _sprsys
lda __viddma
eor #2
sta __viddma
sta _viddma
ldy _ScreenBuffer
ldx _ScreenBuffer+1
and #2
beq _Flip1
clc
tya
adc #<(8159)
tay
txa
adc #>(8159)
tax
_Flip1: sty $fd94 stx $fd95 rts `
From the doc: "When the screen is flipped, the data is read from RAM starting at the bottom of the screen" Therefore the "plus 8159". (Why not 8160 is lost in the past :( )
Thanks. Sample program will be handy.