What sort of problems catastrophy has ??
Code and data that PCEAS expects to be loaded into banks $20..$2F gets loaded into banks $40..$4F instead.
Yeah I don't get it either. Are there other special cases than a 384K ROM?
I seriously doubt it.
AFAIK, the problem only occurs when the ROM is exactly 384KB.
It's a historical issue from obsolete 30-year-old manufacturing technology that emulators have implemented special-case code to handle.
PC Engine really needs a good development/hardware wiki, like the nesdev wiki. The one that exists is good, but outdated and has lots of missing pages.
If all 384K games are using this kind of special mapping so that emulators expects it, it should be written in a wiki or somewhere so that developers are aware of it, and can pad the hole in the ROM.
Yes, this kind of community information is sadly lacking, but that's what we get from being a small development community.
It would be great if there was someone technical here that loved to document stuff ... but that's a rare combination.
The original hardware issue isn't relevant moving forward, because modern HuCards just use 512KB/1MB flash chips, and it is trivial to expand an old 384KB ROM image into 512KB once you know about the problem.
But translation hackers certainly need to know this kind of stuff.
a message with a headsup would work. I know of emulators that do similar things and won't load weird ROMs.
If there are other emulators that freak out at the non-power-of-2 ROM sizes that PCEAS allows, then I'd think that it would probably be best to just (optionally) pad out the ROM images that PCEAS creates.
And mednafen is mapping the upper ROM chip where? Does it duplicate it (so its mirrored) or what? Any more info?
For a 384KB ROM (and probably only for a 384KB ROM with *exactly* $30 banks).
The first 256KB of the ROM gets mirrored in banks $00..$1F and banks $20-$3F.
The next 128KB of the ROM gets mirrored in banks $40..$4F, $50..$5F, $60..$6F, $70..$7F.
So, try building your rom without the header if its present. (-h, iirc). If that works, let us know.
Do you mean the "-raw" flag to PCEAS? I can't see any way to pass that flag to PCEAS when using HuC.
But it was easy to strip off the header in a hex editor, so I did that.
It has nothing to do with the header, as far as I can tell, at least not the one that PCEAS generates.
It is completely an artefact of Mednafen (and other emulators) dealing with how stuff was manufactured back-in-the-day.
There is no *bug* here, both Mednafen and PCEAS are doing sensible things, it's just that there's a bad interaction here between their different views of how the world works.
It only seems to happen when the ROM is *exactly* $30 banks long.
As Arkhan suggested, you can work around it just by adding some extra data into your ROM to make it $31 banks long.
If it doesn't, PM Arkhan and get his permission. We have things to fix that
The problem isn't in just adding another "#incbin" to bump the ROM from $30 banks long to $31 banks long (which works).
Nor is it in supplying a utility to change a 384KB ROM image into a 512KB ROM image ... that's 20-minutes of C coding, most of which is taken up in writing the readme.
The point is to avoid new developers tripping over some black-magic problem and getting stuck by it.
This is presumably the same issue that Dark Kobold hit on Catastrophy a few months back with the old HuC, and was totally stuck on for a while, and IIRC, with nobody here even thinking to suggest that he might have hit "the well-known 384KB problem".
That must have been a frustrating issue for him, that IMHO should never have been hit in a sensible development environment.