R-Type and Mega Flash ROM

By TheRogue

Expert (116)

TheRogue's picture

20-10-2009, 01:37

Hey is there a version out there of R-Type that has been patched to have a mapper compatible with the Mega Flash ROM? Cause right now I try to flash it and it just says Mapper Unknown. I've heard there's one out there modified for MegaRAM, but I have yet to find it. Thanks everyone!

Login or register to post comments

By Jipe

Paragon (1614)

Jipe's picture

20-10-2009, 12:11

R-Type have a special mapper

see Bi-Fi description

R-Type

This is a 3 megabit ROM cartridge. It's pretty weird actually, as all the data would easily fit into 2 megabit. A lot of pages are identical. I'm not sure the top 1 megabit is ever used...

Anyway, it's a 16Kb type mapper:

Bank 1: 4000h - 7FFFh
Bank 2: 8000h - BFFFh

And the address to change banks:

Bank 1: Fixed at 0Fh or 17h
Bank 2: 7000h - 7FFFh (7000h and 7800h used)

Addresses 6000h and 6800h are used somewhere in the code of the game, but this perticulair bit of code is never executed. These addresses don't seem to have effect on anything.

So the value you write selects a 16Kb page. Bit 4 selects the ROM chip. If bit 4 is low, bits 0 - 3 select a page. If bit 4 is high, bits 0 - 2 select a page from the other ROM chip.

But that's not all: page 0 of both ROM chips do not contain the entry code (with AB 'n stuff) of the game. Only the last page of both ROM chips contain the AB code (0Fh and 17h). These pages are identical. So there's a problem: what is the beginning of the ROM and what is the end? Which one of the two ROM chips comes first?

the solution :

make a 512k rom

first bank 41421040
second bank is first bank of real megarom 0880698D83
third bank is second bank of real megarom 5B83849408
etc
change 4142104000000000 to 414240F53C320070F1C9

search 320070 and change with CD0440 in first bank

is not the real mapper but ASCII 16K

By OeiOeiVogeltje

Paragon (1433)

OeiOeiVogeltje's picture

20-10-2009, 15:36

you have mail

By RetroTechie

Paragon (1563)

RetroTechie's picture

20-10-2009, 16:27

Yeah, there's 3 megabits ROM inside the cartridge, but in terms of contents it's more like a 2 1/4 megabits ROM. Both ROMs are used at times though (AFAIK).

The mapper works unlike other common ROM mappers. Most interesting difference is that upon reset, one of the *last* blocks of the ROM is selected, not a block 0 as usual. Shouldn't be too hard to modify the ROM image so that it works in a common type ROM mapper, but yes: some modification would be needed. Experiments should be easy since it switches 16K blocks, and there isn't much (if any) in terms of copy-protection, IIRC. So you could try some things in an ordinary RAM mapper first.

By Jipe

Paragon (1614)

Jipe's picture

20-10-2009, 17:33

for e-mail just click on Jipe in the box on the left of this post

By OeiOeiVogeltje

Paragon (1433)

OeiOeiVogeltje's picture

20-10-2009, 18:13

i mailed TheRogue a working version of this thingie

By SaebaMSX

Hero (533)

SaebaMSX's picture

20-10-2009, 19:33

As a working version (ASCII mapper) of RType exists Manuel thought it was not necessary to modify OPF to handle the direct-dump version. I talked with him about this matter years ago.

By snakepow

Champion (295)

snakepow's picture

15-01-2010, 22:03

Hello, finally I've obtained a working version of R-Type using ASCII 16 Kb Mapper. I have done the following, starting on Jipe's post:

-First bank of 512 kb ROM (R-type Ascii 16 kb) must start "41421040" and following .... These contents can be found on original Megarom at address Hex 3C000
-Second bank of 512 kb ROM (R-type Ascii 16 kb) (starting at adress Hex 4000) must be the first bank of real megarom "0880698D83"
-Third bank of 512 kb ROM (R-type Ascii 16 kb) (starting at adress Hex 8000) must be the second bank of real megarom "5B83849408"

Once this 512 kb ROM (R-type Ascii 16 kb) is mounted, you must modify it by the following (in order):

Search for all "320070" (in ROM's content) and change to "CD0440".

Search for all "4142104000000000000000" (in ROM's content) and change to "41421040F53C320070F1C9".

And that's all. Enjoy!