Previous Thread
Next Thread
Print Thread
Page 100 of 120 1 2 98 99 100 101 102 119 120
Joined: Aug 2009
Posts: 1,276
Likes: 206
Very Senior Member
Very Senior Member
Joined: Aug 2009
Posts: 1,276
Likes: 206
NVRAMs should be initialized with 0xff, cause of why Super Drift Out doesn't initialize it properly. Finding a solution for it...

EDIT: done:
r7795 /src/mess/ (11 files in 4 dirs): Added fill parameter to image_battery_load / image_battery_load_by_name, and fixed SNES NVRAM fill to be 1, fixes Super Drift Out SRAM data

[Linked Image from mamedev.emulab.it]

[Linked Image from mamedev.emulab.it]

Obviously you need to delete any "broken" .nv and probably recompile.

Last edited by Kale; 04/12/10 04:00 PM.
Kale #61110 04/13/10 02:12 AM
Joined: Jun 2008
Posts: 205
B
Senior Member
Senior Member
B Offline
Joined: Jun 2008
Posts: 205
Mapping something beyond its own accessible address isn't so bad. You have to approach it from a hardware address line perspective.

Let's say you have a 16 byte space, and you have 11 bytes worth of unique data. How would you make such a board for real? Keeping in mind that virtually every ROM is a power of two ...
8 + 2 + 1 = 11

Now think about how you'd wire up such a board.
A3 == 0 ? ROM0 { A2, A1, A0 }
Else A1 == 0 ? ROM1 { A0 }
Else ROM2 { }

That would give you an interesting pattern:
0123456789AA89AA

0-7 = ROM0
8-9 = ROM1
A = ROM2

Of course, virtually all our sizes can be done with only one or two ROMs, so it's usually just very simple mirroring.

But we can make a simple algorithm to transform an address with the above mirroring.

Code
unsigned Bus::mirror(unsigned addr, unsigned size) {
  unsigned base = 0;
  if(size) {
    unsigned mask = 1 << 23;
    while(addr >= size) {
      while(!(addr & mask)) mask >>= 1;
      addr -= mask;
      if(size > mask) {
        size -= mask;
        base += mask;
      }
      mask >>= 1;
    }
    base += addr;
  }
  return base;
}

It's a bit prettier in recursive form; but it's slower that way and some of my maps are dynamically modified through MMCs, so smile

byuu #61131 04/14/10 03:12 PM
Joined: Jan 2006
Posts: 3,693
Very Senior Member
Very Senior Member
Joined: Jan 2006
Posts: 3,693
Originally Posted by byuu
Mapping something beyond its own accessible address isn't so bad. You have to approach it from a hardware address line perspective.

Let's say you have a 16 byte space, and you have 11 bytes worth of unique data. How would you make such a board for real? Keeping in mind that virtually every ROM is a power of two ...
8 + 2 + 1 = 11

[snip]

byuu, I understood the ROM mapping when you first explained it two years ago (and MESS code works fine since then).

I'm now interested to understand in which way you handle WRITES to those areas, if there is cartRAM there (notice: RAM and not ROM wink )...
I think I'm doing it right (now, after 2-3 lines changed), but for some reason the code fails for some SuperFX mirroring... that's why I would still like to fully understand your code, which seems to cover those cases fine as well.

Joined: Jun 2008
Posts: 205
B
Senior Member
Senior Member
B Offline
Joined: Jun 2008
Posts: 205
Quote
byuu, I understood the ROM mapping when you first explained it two years ago (and MESS code works fine since then).

I'm now interested to understand in which way you handle WRITES to those areas, if there is cartRAM there (notice: RAM and not ROM wink )...

Apparently not, because there is no distinction between reads and writes in my explanation. And thus, no distinction between ROM and RAM.

In my example, if a read from offset 11 returns "B", then a write to offset 11 will overwrite "B". Thus, the next time you read from offset 10, 11, 14 or 15; you will get the new, overwritten value.

Of course, in practice, I have a granularity of 256 bytes; because a 128MB table of 64-bit pointers is a bit ... extreme. But that's more than enough for any official software.

byuu #61138 04/14/10 06:20 PM
Joined: Jan 2006
Posts: 3,693
Very Senior Member
Very Senior Member
Joined: Jan 2006
Posts: 3,693
Originally Posted by byuu
Apparently not, because there is no distinction between reads and writes in my explanation. And thus, no distinction between ROM and RAM.

thanks a lot for the answer, really smile

this unfortunately makes harder to find our SuperFX problem, but at least it rules out mapping as the main reason. I'm going to review our SRAM code, eventually to check once more that writes are handled properly...

once again, byuu, you're help is invaluable!!

Joined: Sep 2009
Posts: 239
D
Senior Member
Senior Member
D Offline
Joined: Sep 2009
Posts: 239
Final Fantasy III (U) (V1.1)

[Linked Image from rhysperkins.com]

Graphics corruption during intro screens.

SVN 7847 [32-Bit]

Joined: Dec 2009
Posts: 351
ASH Offline
Senior Member
Senior Member
Joined: Dec 2009
Posts: 351
svn 7865

Earthworm Jim 2: Sound problem

At the very start of the cart he plays an accordion but you can't hear it just a few clicks.

Edit: I don't know if this is a known bug so just ignore me if it is smile this sound problem is also on zsnes???? hmmmm might be my cart frown

Edit 2: Nope not my cart as it sounds fantastic on BSNES smile


Also:

I tried Mr Do! on the snes and there is a graphics glitch in M.E.S.S.

this is the zsnes version

[Linked Image from i699.photobucket.com]

this is Bsnes

[Linked Image from i699.photobucket.com]


and the M.E.S.S. version - notice the EXTRA monster is missing from the top of the screen (see red arrows above)

[Linked Image from i699.photobucket.com]

Last edited by ASH; 04/19/10 12:31 PM.
ASH #61228 04/19/10 08:24 PM
Joined: Jun 2008
Posts: 205
B
Senior Member
Senior Member
B Offline
Joined: Jun 2008
Posts: 205
Earthworm Jim 2 requires really, really good CPU<>SMP timing. It spools sound effect samples via HDMA. Same thing as Clayfighters: TE, d4s' music engines, and blargg's CD-quality audio test.

byuu #61431 05/01/10 08:51 PM
Joined: May 2009
Posts: 26
R
Member
Member
R Offline
Joined: May 2009
Posts: 26
Has anyone else noticed a major sound regression in the SNES driver. From my compile, both background music and sounds are replaced by crackling?

Thanks

Joined: Mar 2001
Posts: 17,247
Likes: 265
R
Very Senior Member
Very Senior Member
R Offline
Joined: Mar 2001
Posts: 17,247
Likes: 265
Yeah, eta can't do math. I'll fix it smile

Edit: Pull latest SVN and it's fine.

Last edited by R. Belmont; 05/01/10 09:11 PM.
Page 100 of 120 1 2 98 99 100 101 102 119 120

Link Copied to Clipboard
Who's Online Now
3 members (nerd4gw, r09, Dorando), 207 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,344
Posts122,330
Members5,077
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Powered by UBB.threads™ PHP Forum Software 8.0.0