TASEmulators / fceux

FCEUX, a NES Emulator
http://fceux.com
GNU General Public License v2.0
1.23k stars 254 forks source link

Garbled graphics in Final Fantasy X1/X2/X3 (mapper 4) #55

Closed kage2051 closed 3 years ago

kage2051 commented 5 years ago

Three of the oversized TNROM games, namely:

Those, on the latest git, show garbled graphics along with a grey screen. This is happening since the implementation of the hack for KT-008 Jncota games on MMC3.

The solution here is to use Mapper 224 code from libretro's fork of FCEUX (labeled as fceumm) and either use it as separate mapper or as a clone of MMC3 merged into the original code, but without mixing it with Mapper 4 code via hacks. This way, KT-008 based games will run on Mapper 224 and the three games above might return to their working state.

zeromus commented 5 years ago

that was commit c5fce7dc208a996f4d89658b9b2918b3444aa445 if it works in fceu-mm @g0me3 must have fixed it in fceumm and forgot to copy to fceix

g0me3 commented 5 years ago

let me explain.

  1. there are KT-008 games that uses extra register at 5xxx range

  2. the active data bit to write there is 4 (0000 0100)

  3. all KT-008 games uses it to switch 512K banks, bit4 = 0 means first 512K bank, bit4 = 1 means - second bank.

  4. someone (maybe libreto, maybe nesdev people or even some chinese people) assigned this mapper as ines 224 and it is not supported nor by the fceux nor by fceumm (this mapper is not mine)

  5. me just merged some hacks into mmc3 mapper to be able to run and they are works just fine since mmc3 not using 5xxx range at all and not interfere with any KT-008 games and vice versa.

  6. as about FF Xn games, they ARENT a KT-008 games but something similar. they uses the same extra regiter but not the same data bits!

  7. FF games write something like 0x27 into 5xxx to they switch to the second 512K bank which is not right for thiese games. bank should be first 512K.

  8. so switching to 224 bank won't solve the problem.

  9. ?????

  10. the problem is there are TWO actually mappers 224 and some 224a for FFXn games separately.

but me will handle this for sure, don't worry ;)

g0me3 commented 5 years ago

little fix to make FFXn games playable on the current code base. https://github.com/TASVideos/fceux/commit/705f1c905c99035546d3ff39e96e7533ebb49bd3

if you satisfied with this one, i'll close the issue. but i definitely will split these two mappers sometimes.

keithbowes commented 4 years ago

The solution here is to use Mapper 224 code from libretro's fork of FCEUX (labeled as fceumm)

Minor correction: FCEUmm isn't a fork of FCEUX, but rather a fork of the old FCEUmm, one of the many forks of FCEU (itself a fork of FCE) which were consolidated into FCEUX. (However, libretro's FCEUmm fork's git log does indicate a couple of backports from FCEUX.)