Giter Club home page Giter Club logo

Comments (7)

qwertymodo avatar qwertymodo commented on September 28, 2024

In order to root-cause this issue, has anybody gotten a quad rando ROM working on original hardware (i.e. an actual SA-1 cart, not the SD2SNES/FXPAK). IIRC Vitor ran into some weird issues with bootstrapping certain revisions of SA-1 chips on some of his conversion projects, and something similar could be going on here. I would be hesitant to start throwing fixes at this unless we actually know 100% for sure it isn't a ROM issue.

from snes9x.

bearoso avatar bearoso commented on September 28, 2024

It's 100% likely to be a memory mapping issue. This hack was made for older emulator versions whose heuristics provided more memory than was realistically available. Which means it won't run on an actual SA-1 cart.

I'm going to bet this uses one of those regions that was changed to mirrored memory in that commit.

If we implement manifest support it should allow hacks like this with imaginary memory maps to specify those instead of trying to fit to an existing official game's layout. As far as I can see, this hack doesn't provide any manifests for bsnes/higan/ares, so it probably doesn't run on those, either.

from snes9x.

Skarsnik avatar Skarsnik commented on September 28, 2024

It runs fine on Bsnes and Mesen and it is something that just came out this year x)

from snes9x.

bearoso avatar bearoso commented on September 28, 2024

I'll check how the heuristics differ. I plan to add manifest support eventually to allow any crazy layout to work.

from snes9x.

tewtal avatar tewtal commented on September 28, 2024

I'm the author of the Quad Randomizer/Hack in question here so figured I'd add some detail about exactly how the SA-1 is being used and in what capacity.

It's an 8MB SA-1 ROM (using 64kB of BW-RAM) and it's making quite heavy use of the Super MMC features to remap ROM regions depending on what game is currently running out of the four different games. It also remaps the BW-RAM window in the 6000-7FFF region. The SA-1 sits idle during game execution other than when a switch between games is performed, that's done by the SA-1 mostly.

The SA-1 does however run the main menu system that runs at boot which could be an issue since nothing shows up.
Below is what happens at boot:

At boot the main thing that happens is that it sets the MMC mapping registers to map in the correct banks (from the SNES side) even before the SA-1 is initialized. It writes the SA-1 vectors to registers $2203, $2205 and $2207, write-enables I-RAM AND BW-RAM from the SNES side and clears I-RAM, WRAM and BW-RAM and then finally brings the SA-1 out of reset and then on the SNES side jumps into a loop waiting for commands from the SA-1 to do things like VRAM uploads and such.

On the SA-1 side when it boots it also write-enables I-RAM and BW-RAM from the SA-1 side, sets the SNES vectors to be read from ROM and enables IRQ messaging from the SNES to SA-1 (which is used later to ask the SA-1 to perform a game switch). And after that it waits for the SNES CPU to become ready for SA-1 commands and then executes the menu code.

Edit: As mentioned earlier I've tested this on various bsnes variants, mesen2 and also sd2snes/fxpak and it works fine there.

from snes9x.

bearoso avatar bearoso commented on September 28, 2024

I changed one of the RAM mappings that seemed out of place and the hack starts up now. I don't know if the game switching works, though.

from snes9x.

Skarsnik avatar Skarsnik commented on September 28, 2024

I managed to play a rom a bit and switching between game work fine : )

from snes9x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.