"Weird ROMs" launching

Страница 2/14
1 | | 3 | 4 | 5 | 6 | 7

By Ramones

Champion (264)

Аватар пользователя Ramones

11-01-2016, 17:19

Louthrax wrote:

Thanks for the link. I'm more searching for sources (in order to improve the SofaRun loader), but maybe I can find something by disassbemling ODO.COM (file is not so big).

... Or maybe you can talk with me because I'm the (ODO) coder. Hannibal
(my e-mail address is public)

By gdx

Prophet (3037)

Аватар пользователя gdx

12-01-2016, 00:49

Guillian wrote:
gdx wrote:

A ROM file contains enough information if it is not mapped. The problem is that we must juggle slots, add mirrors and find a good method of execution. 100% is not possible on all media (RAM, MegaRam, Megaflash,...).

That is wrong. You can't know 100% sure where the ROM is located.

My rom loader ROM2MMM (for the Musical Memory Mapper cartridge) can run 100% of existing Roms. It not use any patch nor any option. It is based only on the Rom header and the file size. Wink

Guillian wrote:
gdx wrote:

No, the BIOS searchs in all banks of all slots.

That's wrong also. BIOS only checks page 1 and 2.

You are right only on half. Because if the header of bank 1/2 contains for exemple the adresse 0010h or 0c010h the bios selects the ROM in this bank and runs it. Of course, this works if the Rom of this slot is present in the corresponding bank or if there is a mirror. So Bios also found the Roms of 16KB placed on bank 0 and 3 using mirrors.

By Louthrax

Prophet (2082)

Аватар пользователя Louthrax

12-01-2016, 02:51

So the main issue here is that there's in fact a missing information in the ROM dumps: the start address. This has to be guessed based on the file size and headers, like GDX mentioned.

I agree with Guillian in the sense that this remains a "guess", there's maybe some ways to produce a kind of malicious ROM that could be wrongly mapped, even if I'm sure that a good "guess" method like the GDX one works on all or almost all existing ROMs.

In fact it can be compared to guessing the mapper type on MegaROMs, another missing information in the ROM dumps...

By Louthrax

Prophet (2082)

Аватар пользователя Louthrax

12-01-2016, 02:44

Ramones wrote:
Louthrax wrote:

Thanks for the link. I'm more searching for sources (in order to improve the SofaRun loader), but maybe I can find something by disassbemling ODO.COM (file is not so big).

... Or maybe you can talk with me because I'm the (ODO) coder. Hannibal
(my e-mail address is public)

Thanks Ramones. Think I got all information needed now thanks to you guys. Currently testing my own "guess" function and BASIC launch code, always nice to have different approaches. I'll come back to you if I'm stuck.

GDX your loader works with all "evil ROMs" I listed ?

By mfeingol

Champion (266)

Аватар пользователя mfeingol

12-01-2016, 03:09

Louthrax:

While you're looking at roms, any chance you could take a look at these? http://1drv.ms/1N3MRL4

All of them boot fine using openMSX, but fail when launched from SofaRun + opfxsd. I experimented with a few different opfxsd options, but was unable to get them to boot successfully.

Thanks.

By gdx

Prophet (3037)

Аватар пользователя gdx

12-01-2016, 08:14

Louthrax wrote:

GDX your loader works with all "evil ROMs" I listed ?

Yes I am sure all work like at charm except Harryfox Yuki no Maouhen, the FM PAC, Kanji Rom, Super Lode Runner and MSX Audio (FS-CA1) because these are mapped Roms and moreover some of these use I/O. The header and the file size provide all necessary information. For the mapped Roms, it is different.

I have no merit. The MMM can write protected its memory banks. Once the Rom is loaded in the right banks, it needs just do a reset to execute the rom.

By Guillian

Prophet (3231)

Аватар пользователя Guillian

12-01-2016, 09:26

gdx wrote:

My rom loader ROM2MMM (for the Musical Memory Mapper cartridge) can run 100% of existing Roms. It not use any patch nor any option. It is based only on the Rom header and the file size. Wink

That's is not the point.
The point is that a ROM file does not contain enough information to be 100% sure how it must be loaded or executed so you must guess it.

Just a example:
A 32K ROM with a header at offset #0000 (41 42 10 40)
and a header at offset #8000 (41 42 10 80)
where must be loaded?
#4000? #8000? Mirrored at #0000 and #8000?

Guillian wrote:
gdx wrote:

No, the BIOS searchs in all banks of all slots.

That's wrong also. BIOS only checks page 1 and 2.

gdx wrote:

You are right only on half. Because if the header of bank 1/2 contains for exemple the adresse 0010h or 0c010h the bios selects the ROM in this bank and runs it.

That is what I said in my post.
And the fact is that the BIOS only checks page 1 and 2. So why you say it is right only on half?

By gdx

Prophet (3037)

Аватар пользователя gdx

12-01-2016, 09:56

Guillian wrote:

Just a example:
A 32K ROM with a header at offset #0000 (41 42 10 40)
and a header at offset #8000 (41 42 10 80)
where must be loaded?
#4000? #8000? Mirrored at #0000 and #8000?

A 32K ROM with a header at offset #0000 (41 42 10 40) cannot have an header at offset #8000 because the length is 8000h. If the header is 41 42 10 40 at offset #0000 then the ROM is inevitably placed between 4000h~BFFFh and the mirror of bank 1 on bank 3, then the mirror of bank 2 on bank 0 if I remember correctly.

Guillian wrote:

That is what I said in my post.

Where?

By Guillian

Prophet (3231)

Аватар пользователя Guillian

12-01-2016, 10:00

gdx wrote:

A 32K ROM with a header at offset #0000 (41 42 10 40) cannot have an header at offset #8000 because the length is 8000h. If the header is 41 42 10 40 at offset #0000 then the ROM is inevitably placed between 4000h~BFFFh and the mirror of bank 1 on bank 3, then the mirror of bank 2 on bank 0 if I remember correctly.

I'm sorry. I wanted to mean at offset #4000, not #8000.
And the mirror is wrong. It can be mirrored or not. You can't know it only ckecking the ROM file.

Guillian wrote:

That is what I said in my post.

Where?

Here:

Guillian wrote:

BIOS searchs for ROMs only at pages 1 and 2. If it finds a ROM header with a valid (non 0) start address, it makes a interslot call to that address.

By gdx

Prophet (3037)

Аватар пользователя gdx

12-01-2016, 10:35

No problem. In this cas only the first header is take into account with my method. The first header and the file size having priority. Obviously, my method may be faulty by a person that creates non-standard headers or as a decoy. Even more so because now my method is not applied rigorously in MMM2ROM. I simplified and already I can not find unsupported Rom.

Guillian wrote:

Here:

Sorry, I missing that.

Страница 2/14
1 | | 3 | 4 | 5 | 6 | 7