Possible vblank issue with text getting written to screen

Discussion of programming and development for the original Game Boy and Game Boy Color.
Post Reply
Pennywise
Posts: 71
Joined: Tue Jul 14, 2009 11:04 am

Possible vblank issue with text getting written to screen

Post by Pennywise »

So, I'm translating this simple game and it's pretty much finished, but there's an issue with longer text printing to the screen. I think I know what the issue is, but was hoping to get a second opinion.

Anyhow, I've debugged the game a bit and was able to determine that it's not an issue with the game reading the text data from the ROM. I believe the issue is that due to the extended length, the game runs out of time for vblank and text doesn't get printed as a result.

Image

It should say "Not enough money!" That character at the end is a ryo and a relic from the previous string. Fun fact, the game clears previous strings by just overwriting the old string with the new one. This one's probably a better example.

Image

Anyhow, sometimes it will print no problems and other times not so much.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Possible vblank issue with text getting written to scree

Post by Sumez »

Sorry for not being of any help, but I'm curious why you are translating a game that already exists in English?
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Possible vblank issue with text getting written to scree

Post by Banshaku »

I'm curious too. I guess the original content diverged somewhere to some degree?
Pennywise
Posts: 71
Joined: Tue Jul 14, 2009 11:04 am

Re: Possible vblank issue with text getting written to scree

Post by Pennywise »

Well, there's actually an obscure sequel to the game that I want to translate at some point. So I figured I might as well do this one for the heck of it. IIRC, the official translation stripped the game of its Japanese-ness a bit.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Possible vblank issue with text getting written to scree

Post by Sumez »

There's barely any text in the game, so I'm guessing this is just a training exercise, I just find the choice curious. It's a pretty sweet little game anyway.
This is the first time I heard of a sequel! Gotta check it out.
Pennywise
Posts: 71
Joined: Tue Jul 14, 2009 11:04 am

Re: Possible vblank issue with text getting written to scree

Post by Pennywise »

Incidentally, I looked at the US release and noticed that the issue with longer text isn't an issue for that ROM. I think they made some coding improvements between releases and that might give me what I need to figure this out.
adam_smasher
Posts: 271
Joined: Sun Mar 27, 2011 10:49 am
Location: Victoria, BC

Re: Possible vblank issue with text getting written to scree

Post by adam_smasher »

When the screen is being drawn writes to VRAM are ignored, so that does sound like the issue you're having.

If you want to be sure, you can configure BGB to jump into the debugger on invalid VRAM writes.
Post Reply