Anyway, I suppose the compiler should have padded the ROM, anyway; I should implement the improvement on a future version.
Anyway, I'm happy to know it's working on real hardware!

Moderator: BigEvilCorporation
Could you share an example of such a game?Chilly Willy wrote: Sun Nov 05, 2017 5:50 pmEDIT2: The current NeoMyth menu mirrors rom data to make certain games work that expect mirroring.
God, it's been YEARS since I worked on that, but there were two types of mirroring needed, hence the three settings in the options. HW uses the mapping hardware in the cart to mirror the rom like "normal" - if the rom is 1MB, three mirrors occur in the next three MB to fill the 4MB rom space. This is the default and works for damn near anything. FORCE was added for something, no idea what anymore. It loads the rom, then copies the rom contents via software through the rest of the rom space IMMEDIATELY after the rom. There was something that was an odd size, but still expected a mirror immediately after the rom. OFF simply has 0xFF filling all the space after the rom contents out to 4MB. That is the setting for this game, and I seems to remember some other games needing it, not how many or what, but at least a few.notaz wrote: Mon Nov 06, 2017 1:56 pmCould you share an example of such a game?Chilly Willy wrote: Sun Nov 05, 2017 5:50 pmEDIT2: The current NeoMyth menu mirrors rom data to make certain games work that expect mirroring.
I'm not aware of any games that are relying on mirroring.
Taking a guess: when the setting is set to HW, it'll get confused if the ROM has a weird size and end up trimming part of the end of the ROM (and mirror everything before that). Then the game crashes because part of the data is missing.haroldoop wrote: Sun Nov 05, 2017 10:40 pm That's really weird; AFAIK, there's no routine on the engine that would reach beyond the size of the compiled code.
No, that can't be the case. There's no difference in the read code between any of the rom bank aliasing modes. The only difference between HW and OFF is OFF fills the space after the rom data with 0xFF and doesn't set the rom mapping for mirroring. The rom size used is 4Mb, or 512KB, so it's not accidentally making the space too small. Note that if the rom data is smaller than the rom space, HW doesn't fill that space with anything - it's left at whatever it was before the data was read. If I ever do an update, I'll fill the space up to the rom size with 0xFF. That would also fix this issue as I made a padded version of the file, and it works in HW mode. So it's just something about the space immediately after the file data up to (at most) the next Mb size.Sik wrote: Tue Nov 07, 2017 7:03 amTaking a guess: when the setting is set to HW, it'll get confused if the ROM has a weird size and end up trimming part of the end of the ROM (and mirror everything before that). Then the game crashes because part of the data is missing.haroldoop wrote: Sun Nov 05, 2017 10:40 pm That's really weird; AFAIK, there's no routine on the engine that would reach beyond the size of the compiled code.