SlithyMatt / snes-hello

Hello, World for the SNES
GNU General Public License v3.0
23 stars 10 forks source link

Doesn't work on bsnes #4

Open jeffythedragonslayer opened 3 years ago

jeffythedragonslayer commented 3 years ago

image

bsnes claims 100% compatibility, so if hello world doesn't work on it, there isn't much hope for any other emu

NovaSquirrel commented 3 years ago

It looks like this when you run it on a flashcart too

jeffythedragonslayer commented 3 years ago

Ok, so that means the hello world code is definitely broken, not bsnes. Don't know why it happens to work on snes9x and zsnes.

NovaSquirrel commented 3 years ago

It looks like the main problem is that it accidentally turns on rendering by writing a zero to $2100, and then the attempts to write to the palette and video RAM end up happening while the PPU is rendering a frame so they get ignored. When I fixed that (by writing 128 to that register instead, see here) I get text on the screen. ZSNES inaccurately allows you to write to video RAM at any point, but I don't know why it's working in snes9x.

There's also a more minor problem here where it's not actually clearing the tilemap it's writing "Hello World" to, so the text will be surrounded by whatever VRAM starts up with, which isn't guaranteed to be zero.

jeffythedragonslayer commented 2 years ago

I get text (surrounded by garbage in Mesen-SX, but surrounded by black in bsnes) when I comment this line; didn't need to write 128 anywhere

;stz INIDISP,x

jeffythedragonslayer commented 2 years ago

to clear the tilemap likely needs writing to these regs: http://problemkaputt.de/fullsnes.htm#snesmemoryvramaccesstileandbgmap

jeffythedragonslayer commented 2 years ago

text appears in bsnes now: https://github.com/TrashLid/snes-hello/pull/1

rgalland commented 1 year ago

@jeffythedragonslayer, I've just come to the same conclusion and fixed the code to work on BSNES. Shame the merge is not getting accepted.

jeffythedragonslayer commented 1 year ago

@rgalland SlithyMatt has just merged #5, so it sounds like he's active now? Can you show us what merge you're talking about though?

rgalland commented 1 year ago

Hi, it was #5 I was referring to.


From: jeffythedragonslayer @.> Sent: Sunday, March 26, 2023 5:29:13 AM To: SlithyMatt/snes-hello @.> Cc: rgalland @.>; Mention @.> Subject: Re: [SlithyMatt/snes-hello] Doesn't work on bsnes (#4)

@rgallandhttps://github.com/rgalland SlithyMatt has just merged #5https://github.com/SlithyMatt/snes-hello/pull/5, so I it sounds like he's active now? Can you show us what merge you're talking about though?

— Reply to this email directly, view it on GitHubhttps://github.com/SlithyMatt/snes-hello/issues/4#issuecomment-1483991827, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGPQBX2JVAZUXKZTLUCRTUTW57AZTANCNFSM5DFEB5WA. You are receiving this because you were mentioned.Message ID: @.***>