Nemesis 3 Basic Loader for extracted .bin files

Par alessandro_scaccia

Resident (41)

Portrait de alessandro_scaccia

25-04-2019, 09:42

Hi at all,

I extracted the Megarom Nemesis3 through the romsplit tool in blocks of 16kb and add 7 byte header for bload, I packeted the files to compress them with the RNC tool made by cax, I think.

At this point I didn't understand how to make a Basic Loader to load them.

If we take an example for example of Nemesis, we can see that there is a .bas or .cas which loads all the pieces.

Can anyone give me a way forward?

Thank you very much.

!login ou Inscrivez-vous pour poster

Par RetroTechie

Paragon (1563)

Portrait de RetroTechie

25-04-2019, 10:55

If a file is BLOAD'ed, it just gets loaded into RAM (somewhere in the upper 32K part used by BASIC), and sits there doing nothing.

This is where the ,R option of BLOAD comes in. This calls a machine code routine at the specified address. Of course programmer who creates the BLOAD file must also create that machine code.

Most cracked versions of MegaROMs use this to fill a memory mapper with the ROM's data, by doing BLOAD,R a number of times. Usually the machine code in EACH file then does something like:

        do some slotswitching (optional)
        shuffle memory mapper blocks around
        copy data that was just BLOAD'ed to its destination block in the memory mapper
        restore memory mapper configuration as it should be in BASIC
        restore slot configuration (if changed)
        return to BASIC

When all that is done, you have the MegaROM's contents in the memory mapper. But then you still need some machine code to start it. So last block BLOAD'ed needs to do more work to get things running.

The details are all different per MegaROM, and per cracked version / hacker / programmer who created that. If you really want to, perhaps the best way to understand how, is just take a (any) cracked MegaROM, and follow how it's done. See what the BASIC loader does, get a debugger & see what exactly each piece of machine code does & where data ends up, etc. Question Do this for a number of cracked MegaROM's, and you'll be a master hacker in no-time! Nishi (just kidding)

Par cax

Prophet (3741)

Portrait de cax

27-02-2020, 13:38

I want to add that in order to create "packed MegaROM", first of all there should exist "hacked MegaROM" (which you can zip and make self-extractable), otherwise known as "BLOAD-able multi-BIN version" or "disk version" etc.

Actually, disk version is not an exact term here. In 198x we used to send BLOAD-able versions via classroom network to diskless MSX machines, while pure disk versions of MegaROMs (e.g. those that run from MSX-DOS) could not be sent to other MSX like this.

Also, hacked MegaROM that runs on real MSX without cartridge, may or may not fully fit in the memory.
If your MSX has enough RAM/VRAM, then MegaROM, once loaded, can run without accessing disk anymore.
Such MegaROM conversion can be loaded from tape interface or via MSX network interface (we had those in USSR schools). Of course, creating such a version requires some trickery, especially if you decide to keep some of cartridge data in VRAM.

All "Self-extracting MSX MegaROM games" you see on the mentioned website were created using pre-existing multi-BIN versions, for which various hackers/developers should be credited. Actually, not all of these MegaROM versions existed when I started packing them: the BLOAD-able version of "Metal Gear 2 Demo" I crafted myself.

In case of Nemesis 3 (ROM size 256K), there is no enough free space in machine with 128K RAM/128K VRAM for it.
Games that do not fit in memory usually still can be played on real MSX with disk drive. In this case specially crafted disk version of the MegaROM will sometimes load needed parts from disk, by this erasing in RAM other parts and re-loading them later when needed.