WIP: Reversi
Re: WIP: Reversi
Well, at 2 Mhz and a NOP is 2 clock cycles, that's exactly one microsecond then right? So, since the worst case (graphics mode I or II with all sprites enabled) is 8 microsecond for the VDP, 8 NOPs should be exactly right. Though maybe you should calculated the time for the sta too?
Re: WIP: Reversi
I added some sanety checks on the plotting, but they don't make any difference. Actually sometimes while playing sound effects, it freezes on top of everything. I believe my Creativision jedi powers still are fairly weak, and I need to seek Yoda to teach me.
Re: WIP: Reversi
Yes right, but this all only if you want access to the VDP outside the VBI.
When the VBI start the VDP give you 4300 microsecond for access at full speed.
When the VBI start the VDP give you 4300 microsecond for access at full speed.
Re: WIP: Reversi
I increased to 16 NOP but no difference. I'd like to wait for VBL but somehow it seems to lock up emulation the way I do it (too often?).
This is the current version. Not entirely perfect, but more reliable than before.
http://youtu.be/rYGpq5Th_pw
This is the current version. Not entirely perfect, but more reliable than before.
http://youtu.be/rYGpq5Th_pw
Re: WIP: Reversi
much better!
Re: WIP: Reversi
I'm impressed at seeing so many progresses in just a bunch of hours!
But is it really possible that the CV is such "hard to programme", that you need to calculate the exact number of cpu cycles inbetween every SEI/CLI cycle, in order to prevent graphics glitches?
On a side note, I finally see the "border" colour... hey it's light cyan... the whole game looks like a C64 game!
Is this the way Carlsson wanted it? Or is it just a "side effect" ?
But is it really possible that the CV is such "hard to programme", that you need to calculate the exact number of cpu cycles inbetween every SEI/CLI cycle, in order to prevent graphics glitches?
On a side note, I finally see the "border" colour... hey it's light cyan... the whole game looks like a C64 game!
Is this the way Carlsson wanted it? Or is it just a "side effect" ?
Re: WIP: Reversi
Yes, it is the intended colour scheme. It could be a VTech Laser 500 game as well, same colour scheme.
I have searched the Internet for general VDP hints, but those I found didn't really apply to my problems.
I have searched the Internet for general VDP hints, but those I found didn't really apply to my problems.
Re: WIP: Reversi
I have programmed games for MSX and never had these kind of problems, even on real hardware. Will try to port the gyruss stars and see what happens. Going to Gothenburg tomorrow though, for a retro gaming weekend. See you there, Carlsson!
Re: WIP: Reversi
Yes, msx is much slower in fact of Bus Access.
Carlsen: to Check the #%10000000 in the Main Programm can be difficult
because when Set you are in the vbi and your Main Programm stop.
Carlsen: to Check the #%10000000 in the Main Programm can be difficult
because when Set you are in the vbi and your Main Programm stop.
Re: WIP: Reversi
As I have the routine for interrupt handler, is it so that the interrupt actually is generated at VBL? Perhaps code like this would work?
It would "queue" the writes one at a time, and it being executed at the start of the next interrupt. If that wouldn't solve it, I'm out of clues.
Code: Select all
VSW: ; VDP_Status_Write, assume address in A/Y
pha
wait$:
lda flag
bne wait$
lda #128
sta flag
pla
sta SR0 ; CPU bytes somewhere in the $0300 region
sty SR1
rts
VDW: ; VDP_Data_Write, assume data in A
pha
wait$:
lda flag
bne wait$
lda #129
sta flag
pla
sta DR ; SR0 could also be reused as data byte
rts
Interrupt:
lda flag
beq goon2$
cmp #129
beq wd$
lda SR0
sta VDP_Status_Write
lda SR1
sta VDP_Status_Write
jmp goon$
wd$:
lda DR
sta VDP_Data_Write
goon$:
lda #0
sta flag
goon2$:
... code follows ...