I have finally figured out how to convert the larger VT03 .WXN games into .BIN format, so that they can be used with EmuVT. There are two reasons why doing so is difficult:- EmuVT expects PRG and CHR data in one single address space, i.e. in OneBus form. .WXN games always use separate PRG/CHR address spaces, even the VT03 ones. Combining them into one address space is difficult because ...
- ... .WXN games' PRG and CHR bank register values each expect their data to start at offset zero in their respective address spaces. This means that either all bank register writes must be modified, or the OneBus registers that mask regular bank writes ("PS", $410B) and upper bank registers ("PQ2", $4109) must be written to. These writes would need to be added to the existing game code.
- ... on the OneBus, the last 16 KiB PRG bank is always the last 32, 64, 128, 256 or 512 KiB bank of the .BIN file. Depending on the size of the CHR data, this may require rearranging the several PRG and CHR banks.
- .WXN shuffles the five CHR banking register numbers around: $2012,$2013,$2014,$2015,$2016,$2017 become $2013,$2012,$2017,$2016,$2015,$2014, and MMC3 registers 0,1,2,3,4,5 become 5,4,3,2,1,0. The only way to correct this for EmuVT is to manually patch all banking register numbers.
It's quite a laborious process, and I see no way of doing this automatically. These oddities of .WXN files undoubtedly exist for protection reasons.
Here are few larger .WXN VT03 games converted to .BIN format as a proof of concept. These particular games to my knowledge have not been available anywhere in VT03 .BIN format.
I'm certainly not wasting more time doing this for the other 112 VT03 .WXN ROMs in taizou's archive. Instead, I will try to add VT03 support to Nintendulator. I already managed to add VT02 support, including the additional sound channels that EmuVT does
not emulate, and the ability to load .WXN files directly. At least all those Waixing .WXN RPG/strategy games now run perfectly (as far as what I can tell), including the SRAM functionality.[/s]
Because .WXN VT03 games can now be run
directly in my Nintendulator build, I have removed the download to prevent the spread of more hacked ROM images.