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: 62
Joined: Tue Jul 14, 2009 11:04 am

Possible vblank issue with text getting written to screen

Post by Pennywise » Sat Aug 04, 2018 3:41 pm

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: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Possible vblank issue with text getting written to scree

Post by Sumez » Mon Aug 06, 2018 5:01 am

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: 2328
Joined: Tue Jun 24, 2008 8:38 pm
Location: Fukuoka, Japan
Contact:

Re: Possible vblank issue with text getting written to scree

Post by Banshaku » Mon Aug 06, 2018 8:10 am

I'm curious too. I guess the original content diverged somewhere to some degree?

Pennywise
Posts: 62
Joined: Tue Jul 14, 2009 11:04 am

Re: Possible vblank issue with text getting written to scree

Post by Pennywise » Mon Aug 06, 2018 9:30 am

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: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Possible vblank issue with text getting written to scree

Post by Sumez » Mon Aug 06, 2018 9:30 am

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: 62
Joined: Tue Jul 14, 2009 11:04 am

Re: Possible vblank issue with text getting written to scree

Post by Pennywise » Mon Aug 06, 2018 9:32 am

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: Seattle

Re: Possible vblank issue with text getting written to scree

Post by adam_smasher » Mon Aug 06, 2018 10:33 am

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