Emulator-dependant bug

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Emulator-dependant bug

Post by tryphon » Wed Aug 06, 2014 2:58 pm

Hello,

I try to implement a Variable Width (Proportionnal) Font in the game "Phantasy Star III", and I bump into something quite frightening for me that I describe :

sometimes, some letters are garbled, but :
* it occurs on some NPCs' dialogues, but not on others.
* it doesn't occur everytime on a given NPC
* length of the dialogues, or particular letters, don't seem relevant
* it doesn't occur on the same NPCs if I use Regen or Fusion
* it doesn't occur at all if I use Gens

I have no idea if it occurs on a real Megadrive. I have no idea if Regen or Fusion are more likely to tell the truth than Gens. And if it's a bug from Regen and Fusion, I don't know how to avoid it.

To be true, I have no idea if I am doing something wrong, or if the emulators do. I thought someone more experimented could know this kind of problem.

If you want, I can post the code of the text rendering routine, and screenshots. I can also provide the entire ROM, or just a patch if forum rules forbid it.

Basically, it build patterns by shifting 2bpp images and gluing them, and write in RAM the list of tiles attributes values for the plane.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Wed Aug 06, 2014 3:28 pm

Are they really garbled or they're pointing to other tiles?

Is there enough room in the VDP for the tiles you're building?

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Wed Aug 06, 2014 3:39 pm

First question needs investigation.
Answer to the second is Yes (I build less than 32 tiles from position 0)

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Wed Aug 06, 2014 4:20 pm

After investigation, the pattern pointed is right, but the pattern info is wrong.

Here are some screenshots from the same scene, but with different emulators :

With Gens :

Image
Last edited by tryphon on Wed Aug 06, 2014 4:31 pm, edited 1 time in total.

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Wed Aug 06, 2014 4:24 pm

With fusion :

Image
Last edited by tryphon on Wed Aug 06, 2014 4:32 pm, edited 1 time in total.

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Wed Aug 06, 2014 4:30 pm

With Regen (the two were taken during the same gameplay) :

Image

and

Image

(and I understood why img tag didn't work, sorry for the inconvenience)

Gigasoft
Very interested
Posts: 95
Joined: Fri Jan 01, 2010 2:24 am

Post by Gigasoft » Wed Aug 06, 2014 5:41 pm

Looks like you are failing to synchronize accesses to the VDP. Make sure that you don't get interrupted in the middle of accessing the VDP by code that also accesses the VDP. Data uploads should preferably happen during blanking.

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Post by tryphon » Thu Aug 07, 2014 7:32 am

You were right. VBLANK was interfering.

Edit : I forgot to say "Thank you !" :)

Post Reply