mamedev / mame

MAME
https://www.mamedev.org/
Other
8.05k stars 2.01k forks source link

Does not work when running some nes game #10867

Open sanzenwin opened 1 year ago

sanzenwin commented 1 year ago

MAME version

mame0251b_64bit.exe 0.251 (mame0251)

System information

Edition Windows 10 Pro Version 22H2 Installed on ‎10/‎30/‎2020 OS build 19045.2251 Serial number 043843681353 Experience Windows Feature Experience Pack 120.2212.4180.0

INI configuration details

No response

Emulated system/software

No response

Incorrect behaviour

I have two roms: fc_contracs.nes fc_contramdl.nes (links to roms censored) They are working fine in VirtuaNES.exe

But in MAME: For fc_contracs.nes, I got some logs: Fatal error: memory_bank::set_entry called for bank ':prg0' with out-of-range entry 24934

For fc_contramdl.nes, I can enter the game normally, but it will fail when I go to the stage one, it show me the stage zero which is not exists. https://github.com/sanzenwin/public-res/blob/main/fc_contramdl.nes.jpg

Expected behaviour

-

Steps to reproduce

Running mame nes, then choose the rom file.

Additional details

No response

rb6502 commented 1 year ago

@0kmg any ideas?

dinkc64 commented 1 year ago

My emulator also has the same problem, will post some hints if I can figure it out. EDIT: Mesen also has the same issue, must be a weird one..

dinkc64 commented 1 year ago

@0kmg, Turns out I was masking the prg banks with 0x1f, which is documented on the nesdev vrc2 & 4 wiki: https://www.nesdev.org/wiki/VRC2_and_VRC4 - PRG Select 0 / PRG Select 1

0x1f is not able to address the entire prg rom (409600 bytes) of these hacks. Of course, removing the mask solves this issue.

Hope this helps :)

sanzenwin commented 1 year ago

Repo: https://github.com/sanzenwin/public-res Stage one: https://github.com/sanzenwin/public-res/blob/main/fc_jackalwj.jpg

@dinkc64 , please check this one.

dinkc64 commented 1 year ago

@sanzenwin, sure. Can you tell more info about these, does cs and mdl mean something? I'm interested where these came from and if they have a hack/name/description associated with them.

best regards,

sanzenwin commented 1 year ago

@dinkc64 , I got them from my QQ(this is a chinese social platform) friends. fc_contracs.nes -> CN:最后的重生 === EN:The last rebirth fc_contramdl.nes -> CN:魔斗罗 === EN:Demon Contra fc_jackalwj.nes -> CN: 无尽的任务 === EN:Infinite missions

dinkc64 commented 1 year ago

Thank you! Do you know who is the author of fc_contracs & fc_contramdl?

@0kmg, Problem with Jackalwj is also a mask on prg (mapper73, vrc3)

cuavas commented 1 year ago

The thing is, MAME is supposed to emulate the chips with their real-world limitations.

sanzenwin commented 1 year ago

@dinkc64 List of authors : fc_contracs -> CN:静静不想我 === EN: fc_contramdl -> CN:幻天 === EN: fc_jackalwj -> CN:曾哥 === EN:zeng ge

sanzenwin commented 1 year ago

The thing is, MAME is supposed to emulate the chips with their real-world limitations.

How about providing a flag to break the limitations? the flag will be closed by default.

ghost commented 1 year ago

different limitations should be assigned a different mapper number as they would require different hardware to implement.

taoenwen commented 1 year ago

@dinkc64 , I got them from my QQ(this is a chinese social platform) friends. fc_contracs.nes -> CN:最后的重生 === EN:The last rebirth fc_contramdl.nes -> CN:魔斗罗 === EN:Demon Contra fc_jackalwj.nes -> CN: 无尽的任务 === EN:Infinite missions

fc_jackalwj.nes -> EN:Endless Mission

image