I am now able to test .sms files on real Master System hardware.
In my game Deepspace, the spaceship leaves a snail trail behind it, similar to the one we had on the Agon light, only a bit more ragged.
Any idea what could be wrong here? In the Fusion emulator, everything looks fine.
[SMS] Mono sprites snail trail problem
[SMS] Mono sprites snail trail problem
You do not have the required permissions to view the files attached to this post.
Re: [SMS] Mono sprites snail trail problem
My hunch is VDP timing. I thought we'd squished all the problems, but some may have got through.
There is an emulator that reports VDP timing problems, but I've forgotten the name of it at the moment - if the game is run in that emulator with reporting enabled that should confirm it.
There is an emulator that reports VDP timing problems, but I've forgotten the name of it at the moment - if the game is run in that emulator with reporting enabled that should confirm it.
Re: [SMS] Mono sprites snail trail problem
If I remember from my MSX games, is that its VDP (and therefore also the SMS one) has problems if you are OUTing data too fast.
The trick I did on the MSX is to have some extra T-states between each OUT so that the VDP has time to recover.
I don't know how it works with the SMS, but people who ported my Heart Stealer 2 from MSX to SMS (without permission though, like many other MSXDev games) didn't had much problems with it.
The trick I did on the MSX is to have some extra T-states between each OUT so that the VDP has time to recover.
I don't know how it works with the SMS, but people who ported my Heart Stealer 2 from MSX to SMS (without permission though, like many other MSXDev games) didn't had much problems with it.
Re: [SMS] Mono sprites snail trail problem
I agree, I was betting on the VDP transfers concurrently with you.
. Having a real hardware to test on is always of great help, though. Do you think we can do some trial and error with Robert?

Re: [SMS] Mono sprites snail trail problem
As an inspiration, I'm currently looking at my own MSX library, and here are two functions from it:
I can't remember much of it any more, but there seems to be dedicated wait instructions in there, according to my own comments. 
Note: These are MSX routines and the port numbers for the SMS are different.
Note: These are code before the naked changes to __FASTCALL__ so remember to update them for the current z88dk version.
Code: Select all
uchar __FASTCALL__ vdp_read(uchar reg)
{
// h = register, l = value
#asm
ld a, l
di
out ($99), a
ld a, 15+128
out ($99), a
ld a, (de) ; wait 7 t-states
in a, ($99)
ld l, a ; store return value in hl
xor a
ld h, a
out ($99), a
ld a, 15+128
ei
out ($99),a
#endasm
}
void __CALLEE__ vpoke(int address, uchar value)
{
#asm
pop ix
pop bc ; c = value
pop hl ; hl = vram address
push ix
ld a,l
di
out ($99), a
ld a,h
and 63
or 64
ei
out ($99), a
ld a, c
out ($98), a
#endasm
}

Note: These are MSX routines and the port numbers for the SMS are different.
Note: These are code before the naked changes to __FASTCALL__ so remember to update them for the current z88dk version.
Re: [SMS] Mono sprites snail trail problem
Sure, I am ready to do trial-and-error testing until we get it working.
@SMS owners: search for "DIY 600 in 1" on AliExpress.
Re: [SMS] Mono sprites snail trail problem
It's Emulicious that reports issues - it also reads .map files which makes for a very comfortable debugging experience.
As an added bonus it's also showing graphical artefacts.
As an added bonus it's also showing graphical artefacts.
Re: [SMS] Mono sprites snail trail problem
And, I've now pushed a fix for the timing errors reported - I think that's actually a very big recommendation for using Emulicious as an emulator.
Re: [SMS] Mono sprites snail trail problem
Black belt confirmed, Dom. You're getting so fast in fixing.. everything?
Re: [SMS] Mono sprites snail trail problem
Problem fixed, thanks Dom!
Agreed, it was reproducing the problem exactly as on the original hardware!
You do not have the required permissions to view the files attached to this post.