Mode3 problem with my lib

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
alekmaul
Posts: 54
Joined: Tue Apr 24, 2012 12:22 pm
Contact:

Mode3 problem with my lib

Post by alekmaul »

Hi all,
I'm trying to use standard mode 3( not DC direct), and I have a strange feature.
The result is OK with no$sns and zsnes but KO with bsnes 0.88. It's also KO on my SNES so I think bsnes is right with its features.
The source code is in snes-sample, from mode3 example.
I'm trying to debugging with no$sns but i really can't find why it's KO.
Here are screenshots :
Image Image

Mode3 is the only mode that does not works. All works fine with mode0,1 and 7 (no test of other modes currently ...).

And link to sfc file :
http://www.portabledev.com/media/SNES/P ... /Mode3.sfc

Does anyone has an idea where I can investigate to know what is wrong with the lib ?
Jsolo
Posts: 27
Joined: Mon Jun 27, 2011 4:14 am
Location: Lurker Cave

Post by Jsolo »

You're performing a DMA during VBlank that lasts until scanline 12; as your screen is enabled, any VRAM write is blocked by hardware on the pre render scanline.
If you want to transfer whole char- or tilemaps, you should do that during forced blank.
alekmaul
Posts: 54
Joined: Tue Apr 24, 2012 12:22 pm
Contact:

Post by alekmaul »

Hi Jsolo,
You were absolutely right :D

I changed my init tileset function bgInitTileSet with :

setBrightness(0); // Force VBlank Interrupt
WaitForVBlank();

// Send to VRAM and CGRAM
dmaCopyVram(tileSource, address, tileSize);
dmaCopyCGram(tilePalette, palEntry, paletteSize);
bgSetGfxPtr(bgNumber, address);

And now, it's correct on bsnes and my "not so real snes" Supaboy console :D !

Thanks a lot !

By the way, nocash, it means that no$sns 1.2 has problem with such checking of VBlank.
Post Reply