nesdev.com
http://forums.nesdev.com/

N64 homebrew cartridge can not save sram.
http://forums.nesdev.com/viewtopic.php?f=23&t=16380
Page 1 of 1

Author:  byemu [ Sat Aug 19, 2017 3:58 am ]
Post subject:  N64 homebrew cartridge can not save sram.

This is my n64 homebrew cartridge,I have flash a n64 game called biohazard2.
Image
But in game, can not save sram.
when I read 32k sram from cartridge, 32k data only the first 4byte show BIO2, others data is all 0x00.

Author:  lidnariq [ Sat Aug 19, 2017 3:33 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

Do you have the source for the logic in the MAX2 ?

More-or-less the only other thing you could do would be to compare a known good save to the wrong values you're getting.

Author:  byemu [ Sun Aug 20, 2017 12:51 am ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

lidnariq wrote:
Do you have the source for the logic in the MAX2 ?

More-or-less the only other thing you could do would be to compare a known good save to the wrong values you're getting.


This is core mycode:
Code:
assign enable_rom  = m_address[30:27]==4'b0001 ? aleh : 1'b1;//0x10000000
assign enable_sram = m_address[30:26]==5'b00001 ? aleh : 1'b1 ;//0x08000000


It's work on game "Ogre Battle 64 - Person of Lordly Caliber (U) (V1.0) [!]";

Author:  lidnariq [ Sun Aug 20, 2017 11:00 am ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

At this point, I'd compare to a known-good save from e.g. an emulator.

Author:  byemu [ Sun Aug 20, 2017 4:30 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

lidnariq wrote:
At this point, I'd compare to a known-good save from e.g. an emulator.


Maybe it's depend on the CIC, but I'm not sure.

Author:  lidnariq [ Sun Aug 20, 2017 5:51 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

If it were the wrong CIC, that would prevent booting altogether ... unless it both needs, and you have, a bad implementation of the 6105.

(The hash of the first 4 KiB of the cart ROM has to match the hash presented by the CIC or else the PIF goes into an infinite loop. If the hash does match, then it passes off execution in those 4 KiB)

Author:  byemu [ Sun Aug 20, 2017 8:26 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

lidnariq wrote:
If it were the wrong CIC, that would prevent booting altogether ... unless it both needs, and you have, a bad implementation of the 6105.

(The hash of the first 4 KiB of the cart ROM has to match the hash presented by the CIC or else the PIF goes into an infinite loop. If the hash does match, then it passes off execution in those 4 KiB)

1 How to change a homebrew rom to a spencified cic(ex: 6105,only boot on a 6105cic).
2 My verilog code is wrong.

Author:  lidnariq [ Wed Aug 23, 2017 8:35 am ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

The x101 and x102 boot sectors can be just directly interchanged; the other three CICs each do something different and can't be easily swapped.

Flashcarts like the everdrive64 reimplement the boot sectors in order to allow running everything as though it were on a 6102/7101.

Author:  byemu [ Wed Aug 23, 2017 7:32 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

lidnariq wrote:
The x101 and x102 boot sectors can be just directly interchanged; the other three CICs each do something different and can't be easily swapped.

Flashcarts like the everdrive64 reimplement the boot sectors in order to allow running everything as though it were on a 6102/7101.

Maybe need a bootemu, first will boot to bootemu,next swap the rom section via mmc,then boot to gamerom.

BTW, I solved the sram problem.

Author:  lidnariq [ Wed Aug 23, 2017 9:06 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

byemu wrote:
BTW, I solved the sram problem.
What was wrong?

Author:  byemu [ Wed Aug 23, 2017 9:27 pm ]
Post subject:  Re: N64 homebrew cartridge can not save sram.

lidnariq wrote:
byemu wrote:
BTW, I solved the sram problem.
What was wrong?

SRAM logic not same as ROM logic.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/