HELP needed - issues with H.STKE hook.

Página 2/3
1 | | 3

Por NYYRIKKI

Enlighted (5889)

imagem de NYYRIKKI

20-08-2021, 10:32

max_iwamoto wrote:

One more thing... When I originally read about mirrored ROM, I checked and my ROM size was 64KB. So, possibly, the emulator would see it as a mirrored ROM... I changed ROM size to 128KB and it didn't make any difference.

No, that won't work... The problem is that MSX reads the "AB"-header from #4000 and then starts the init routine mentioned on #4002. When that is finished it reads the "AB"-header from #8000 and then starts the init routine again as it is also mentioned in #8002 due to mirroring... So in your case one way to prevent this is to change the page visible in #8000-#BFFF to something else, so that the "AB"-header is not found... As it was already mentioned, using the H-register is not documented way, so in that sense this would be maybe more acceptable approach.

Por gdx

Enlighted (4818)

imagem de gdx

20-08-2021, 10:49

zeilemaker54 wrote:

OpenMSX does ROM mirroring (which is wrong in my opinion) on homebrewed 16KB ROMs

You are wrong. Some comercial ROM use its mirrors as copy protection, and mirrors have no effect on the majority of other ROMs. Choose ROM with mirrors, or not, is just arbitrary. It's neither right nor wrong. There are cases where it is better others not.

max_iwamoto wrote:

didn't use it, because the area was already populated with C9h (RET) when ROM was executed.

Use it anyway. It is better to initialize the values that you think are initialized by default yourself, because that is often what causes the problem in programs.

Por ducasp

Champion (466)

imagem de ducasp

20-08-2021, 16:59

zeilemaker54 wrote:
Manuel wrote:

If you want a certain wiring of your ROM cartridge emulated, better explicitly specify the corresponding mapper type.

Of course that is a solution, but as stated I do not agree to the OpenMSX default of mirroring a 16 KB ROM.
A normal cartridge with a 16KB ROM is wired to CS1 (page 1) or CS2 (page 2) and is therefore not mirrored.
Of course there are cartridges which are wired differently (not using CS1 or CS2), but they are the minority. And those need a specified mapper type. And may be those could be added to the softwaredb.xml or have their own extension xml, making OpenMSX select the correct mappertype and mirroring.

I believe that this was chosen as default for BlueMSX and OpenMSX as well due to the fact that there are a few ROMs that rely on mirroring, and those not relying on mirroring, for most cases, have no issues (as most roms that are not in the database are usually games, and usually do not return control to the system). Remember that this applies only to roms not in the database, as the database already has the correct type for each known ROM....

Understand that for someone developing something that handles hooks and returns control to the system this can be frustrating, but believe that the default was a sensible choice for most user scenarios of an unknown rom

Por ducasp

Champion (466)

imagem de ducasp

20-08-2021, 17:04

max_iwamoto wrote:

One more thing... When I originally read about mirrored ROM, I checked and my ROM size was 64KB. So, possibly, the emulator would see it as a mirrored ROM... I changed ROM size to 128KB and it didn't make any difference.

I also tried to force mapper type to ASCII 16 or use "guess ROM type" option and still no changes.

That is weird, a 64KB ASCII 16 mapper rom will not have 8000 mirroring 4000, does 8000 in your rom have the header, making the machine to think it is a different software to be executed?

Por NYYRIKKI

Enlighted (5889)

imagem de NYYRIKKI

20-08-2021, 17:30

I'm not against ROM mirroring. There are certainly situation where the ROM mirroring is actually quite handy... like if you need to access whole 64kB of RAM, but I know this was not the question... If we think the problems that ROM mirroring may cause, there is a good change that the program works correctly even if the init routine ends up running twice. How ever missing mirroring is almost certain recipe for crash and in that sense I think mirroring is less harmful default than not having it... I don't have any data of how many programs would actually fail if there would not be mirroring (I think all emulators default to mirroring?), so this opinion is purely based on the "may rarely cause trouble" vs "99% certain crash" aspect.

Por Grauw

Ascended (10158)

imagem de Grauw

20-08-2021, 18:36

gdx wrote:
zeilemaker54 wrote:

OpenMSX does ROM mirroring (which is wrong in my opinion) on homebrewed 16KB ROMs

You are wrong. Some comercial ROM use its mirrors as copy protection, and mirrors have no effect on the majority of other ROMs. Choose ROM with mirrors, or not, is just arbitrary. It's neither right nor wrong. There are cases where it is better others not.

It means there are two 16K ROM mapper types one mirrored and one not, and the correct one should be specified on a game by game basis in the software DB. The argument that goes from the presumption that the emulator must guess, the software DB is precisely there to prevent the emulator from relying on guessing ROM type, which is notoriously unreliable.

What zeilemaker is saying is that when the mapper type is unknown (guessed), it should default to non-mirrored for 16K ROMs because the mirroring causes issues during new developments, while the usefulness of having mirroring is minimal.

This change of the guessing algorithm should be fine if existing software which relies on mirroring is in the ROM DB.

Por zeilemaker54

Champion (315)

imagem de zeilemaker54

20-08-2021, 19:15

@Grauw, well summarized. Exactly my point.

Por Manuel

Ascended (18246)

imagem de Manuel

20-08-2021, 19:28

Did someone check whether the database contains the proper data for these then?

Por NYYRIKKI

Enlighted (5889)

imagem de NYYRIKKI

20-08-2021, 22:17

Manuel wrote:

Did someone check whether the database contains the proper data for these then?

I did quick simple search on the version I have... I don't even try to say these are exactly correct numbers or all relevant, but what the quick search gave me is that I have 5821 entries with 202 defined as normal, 3 as mirrored and 2835 have no type defined.

If I get it right, I think these 2835 or so ( + those that are not yet in DB) are based on the guess algorithm ATM and therefore should be checked against real hardware at some point.

Por Manuel

Ascended (18246)

imagem de Manuel

20-08-2021, 22:20

So, that means that if you change the guess algorithm, you break a lot of stuff...

Página 2/3
1 | | 3