NES core on MiST

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

NES core on MiST

Postby Newsdee » Wed Jan 06, 2016 12:47 pm

It would be great if we could extend the mapper support for the NES core.

Mappers are custom chips that went into cartridges; for a system like the MiST that only uses ROMs, they need to be re-implemented in order to support more games. The current core supports several mappers already, but noticeably less than e.g. the Everdrive N8 (FPGA cartridge). I've done some searching some months ago, and estimated that expanding support to reach the level of the Everdrive would "unlock" about 185 more games.

Another nice expansion would be to support save RAM by writing to the SD card. Currently it is "emulated" but does not persist, so we can e.g. play Zelda but will lose all progress between sessions. The handling is done by some of the mappers.

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Wed Jan 06, 2016 12:58 pm

In emulators the mappers are numbered following the "iNES" format, with common commercial mappers numbered from 0 to 255.
Not all mappers have been used though; I've created this matrix comparing the MiST to the Everdrive:

Image

Mapper 10 ("MMC4") is probably a good example as it is an extension of Mapper 9 ("MMC2") already supported by the MiST.
The differences are more memory banks and the support of save RAM.

Details on both mappers can be found here:
http://wiki.nesdev.com/w/index.php/MMC2
http://wiki.nesdev.com/w/index.php/MMC4

In HDL the code is in mmu.v. Each mapper is a different module, and a case statement maps input wires to them:

Code: Select all

case(flags[7:0])
   
    1:  {prg_aout, prg_allow, chr_aout, vram_a10, vram_ce, chr_allow}     
    = {mmc1_prg_addr, mmc1_prg_allow, mmc1_chr_addr, mmc1_vram_a10, mmc1_vram_ce, mmc1_chr_allow};
   
    9:  {prg_aout, prg_allow, chr_aout, vram_a10, vram_ce, chr_allow}     
    = {mmc2_prg_addr, mmc2_prg_allow, mmc2_chr_addr, mmc2_vram_a10, mmc2_vram_ce, mmc2_chr_allow};
Last edited by Newsdee on Wed Jan 06, 2016 11:15 pm, edited 1 time in total.

User avatar
farvardin
Captain Atari
Captain Atari
Posts: 348
Joined: Fri Jan 01, 2010 5:50 pm
Location: France
Contact:

Re: NES core on MiST

Postby farvardin » Wed Jan 06, 2016 2:06 pm

what could be cool too: scanlines

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Fri Jan 08, 2016 7:44 pm

(Edited)
Last edited by vebxenon on Wed Feb 17, 2016 3:13 pm, edited 1 time in total.
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

cyberic
Atarian
Atarian
Posts: 2
Joined: Sat Feb 14, 2015 3:42 pm

Re: NES core on MiST

Postby cyberic » Tue Feb 09, 2016 10:55 pm

Hello

I just tested some nes audio tools by Neil Baldwin:
http://www.nes-audio.com/

ntrq: works
pr8: complains that 32k saves are not supported
pulsar: complains that 32k saves are not supported

It would be awesome to support 32k saves, and to be able to save to SD.
32k saves are only supported by a few emulators:
nestopia and Nintendulator (with sources)

Because these programs are really great for music production on the NES.

Thanks!

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Wed Feb 10, 2016 8:36 am

Newsdee wrote:In emulators the mappers are numbered following the "iNES" format, with common commercial mappers numbered from 0 to 255.
Not all mappers have been used though; I've created this matrix comparing the MiST to the Everdrive:

Image

Mapper 10 ("MMC4") is probably a good example as it is an extension of Mapper 9 ("MMC2") already supported by the MiST.
The differences are more memory banks and the support of save RAM.

Details on both mappers can be found here:
http://wiki.nesdev.com/w/index.php/MMC2
http://wiki.nesdev.com/w/index.php/MMC4

In HDL the code is in mmu.v. Each mapper is a different module, and a case statement maps input wires to them:

Code: Select all

case(flags[7:0])
   
    1:  {prg_aout, prg_allow, chr_aout, vram_a10, vram_ce, chr_allow}     
    = {mmc1_prg_addr, mmc1_prg_allow, mmc1_chr_addr, mmc1_vram_a10, mmc1_vram_ce, mmc1_chr_allow};
   
    9:  {prg_aout, prg_allow, chr_aout, vram_a10, vram_ce, chr_allow}     
    = {mmc2_prg_addr, mmc2_prg_allow, mmc2_chr_addr, mmc2_vram_a10, mmc2_vram_ce, mmc2_chr_allow};


Are you sure that for example mapper 119 is supported by MiST NES core? http://wiki.nesdev.com/w/index.php/INES_Mapper_119 I've tested Pinbot and High Speed and these games don't work...

(UPDATE 16-2-2016 finally I'm able to play Pinbot and High Speed, using the USA version :D)
Last edited by vebxenon on Tue Feb 16, 2016 9:29 am, edited 1 time in total.
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Wed Feb 10, 2016 8:37 am

cyberic wrote:Hello

I just tested some nes audio tools by Neil Baldwin:
http://www.nes-audio.com/

ntrq: works
pr8: complains that 32k saves are not supported
pulsar: complains that 32k saves are not supported

It would be awesome to support 32k saves, and to be able to save to SD.
32k saves are only supported by a few emulators:
nestopia and Nintendulator (with sources)

Because these programs are really great for music production on the NES.

Thanks!


Good request :cheers: It would be great to create music for NES using MiST Board.
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Tue Mar 08, 2016 2:33 pm

I bought this NES like USB pad, which I received last friday and it works like a charm using MiST Board :cheers: :cheers:

http://retrocables.es/tienda/index.php? ... &id_lang=4
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Wed Mar 09, 2016 3:41 pm

So I found a nice resource on mappers:
http://tuxnes.sourceforge.net/mappers-0.80.txt

Now I just need to figure out how to transform the existing HDL code for MCC2 to support MMC4...

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Thu Mar 10, 2016 2:57 pm

Newsdee wrote:So I found a nice resource on mappers:
http://tuxnes.sourceforge.net/mappers-0.80.txt

Now I just need to figure out how to transform the existing HDL code for MCC2 to support MMC4...


Great doc! :)
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

lips2k15
Atari freak
Atari freak
Posts: 60
Joined: Tue Mar 29, 2016 10:19 am

Re: NES core on MiST

Postby lips2k15 » Mon May 02, 2016 9:13 am

Hi guys I got a bug to report - I think anyway... a rom hack that re creates super mario all stars on the NES dosnt work properly on the MIST NES core - here is info on the rom http://acmlm.kafuka.org/board/thread.php?id=8211

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Mon May 02, 2016 11:55 pm

That uses the MMC5 mapper which isn't fully supported.

In fact there is no hardware that will play it right now, because (like in The Legend of Link) they use bigger ROMs than what has ever been commercially available for the MMC5. Neither the Everdrive N8 or the Powerpak can run it.

In principle the MiST could make it work by allowing 1MB CHR and PRG roms, but that needs new development (its not a bug to be fixed).

lips2k15
Atari freak
Atari freak
Posts: 60
Joined: Tue Mar 29, 2016 10:19 am

Re: NES core on MiST

Postby lips2k15 » Tue May 03, 2016 12:32 am

ahh thank you for the info - I am not very well versed in nintendo 8bit... just out of curiosity could the MIST NES core support fds images?

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Tue May 03, 2016 11:51 pm

No, no FDS support either :(

sebdel
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 115
Joined: Fri Dec 30, 2005 9:29 am

Re: NES core on MiST

Postby sebdel » Mon Sep 05, 2016 5:57 pm

edit: sorry, double post
Last edited by sebdel on Mon Sep 05, 2016 6:04 pm, edited 1 time in total.

sebdel
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 115
Joined: Fri Dec 30, 2005 9:29 am

Re: NES core on MiST

Postby sebdel » Mon Sep 05, 2016 5:58 pm

I tried to implement the mmc4 mapper today and had some success at first (saw the whole Famicom war intro!) but then it failed later in game and the more I try to fix it the more it fails. Actually I think the mmc2 mapper is bugged too, so...
Do you know a game that is supposed to use mmc2 and runs on mist? Fire emblem doesn't.
And do you know other games that use mmc4 besides Famicom war? I need more samples I think. Anyway, I'll try again tomorrow :shrug: .

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Mon Sep 05, 2016 11:13 pm

(dupe post, see below)
Last edited by Newsdee on Wed Sep 07, 2016 1:53 am, edited 1 time in total.

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Mon Sep 05, 2016 11:46 pm

Fire Emblem and its sequel are MMC4 as well

MMC2 is Punch Out
http://wiki.nesdev.com/w/index.php/MMC2

Good progress though! If we can get more mappers going the NES core will be great.

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Tue Sep 06, 2016 8:48 am

MMC2 http://wiki.nesdev.com/w/index.php/MMC2

"The Nintendo MMC2 is an ASIC mapper, used on the PNROM and PEEOROM Nintendo Game Pak boards for Mike Tyson's Punch Out!!. The iNES format assigns Mapper 009 to PxROM. This chip appeared in November 1987. " Games (1) : http://bootgod.dyndns.org:7777/profile.php?id=155

MMC4: http://wiki.nesdev.com/w/index.php/MMC4

"The Nintendo MMC4 is an ASIC mapper, used on the FxROM board set. The iNES format assigns mapper 10 to these boards. The chip first appeared in August 1988. " Games (3) : http://bootgod.dyndns.org:7777/search.p ... up=groupid

About a mapper that some games work... RAMBO-1 from Tengen. Shinobi works well, Klax doesn't work: http://wiki.nesdev.com/w/index.php/RAMBO-1

Games (5): http://bootgod.dyndns.org:7777/search.p ... up=groupid

Regards,

Salva
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

sebdel
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 115
Joined: Fri Dec 30, 2005 9:29 am

Re: NES core on MiST

Postby sebdel » Tue Sep 06, 2016 11:48 am

Updated NES core:
https://drive.google.com/open?id=0ByKxevpwe6i9Y3ZGQ0JCWVpYNzg

It's a cumulative build of my patches (I'm submitting to github as we speak):

- Added scanlines
- Improve stability when loading ROMs (not perfect, but better for sure)
- Fix obscure bug in MMC2 but I didn't notice any effect on Punch Out. Fixes a potential graphic glitch.
- Added MMC4 (unlocks Famicom Wars and Fire Emblem Gaiden , not Fire emblem though)

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Tue Sep 06, 2016 2:48 pm

Thanks a lot! Merged, and released a built core into the binary area.

User avatar
vebxenon
Captain Atari
Captain Atari
Posts: 484
Joined: Fri Apr 24, 2015 12:10 pm

Re: NES core on MiST

Postby vebxenon » Tue Sep 06, 2016 7:57 pm

Thanks sebdel for your work! :D

Regards,

Salva
Just a computer and videogame lover :)

- Atari Jr 2600 clone
- Atari 7800 Peritel
- Atari XEGS
- Atari Lynx II
- Atari Jaguar
- MiST Board

ericgus
Captain Atari
Captain Atari
Posts: 349
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: NES core on MiST

Postby ericgus » Tue Sep 06, 2016 11:03 pm

The scanline option can be permanently disabled correct? just checking, haven't had time to try out the new core.

User avatar
Newsdee
Atari Super Hero
Atari Super Hero
Posts: 989
Joined: Fri Sep 19, 2014 8:40 am

Re: NES core on MiST

Postby Newsdee » Wed Sep 07, 2016 12:12 am

yes, it's like every other option

ericgus
Captain Atari
Captain Atari
Posts: 349
Joined: Fri Apr 08, 2016 4:53 am
Location: Boston MA - USA

Re: NES core on MiST

Postby ericgus » Wed Sep 07, 2016 1:49 am

Newsdee wrote:yes, it's like every other option


Great thanks!


Return to “MiST”

Who is online

Users browsing this forum: skywalky and 1 guest