about ludde nes port and simulation

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

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

thecrazyboy
Atarian
Atarian
Posts: 5
Joined: Fri Dec 11, 2015 3:20 am

about ludde nes port and simulation

Postby thecrazyboy » Fri Dec 11, 2015 3:48 am

Hello everyone and mist-developers,
does anyone successfuly simuluate the ludde nes in modelsim or other simulator?
I have tried and failed ,because many signals are unkown (x state) during simuation cause cpu stop at some instruction.
and I do some modification by initialize signals in initial statement or during reset , but I can‘t fix it all because i am a newbie.

I am sure ludde has used simulator to debug his code, because I find lots of system function $write invoked and commented in the source code,
but I just can't figure out how can he debug the code with so mang unkown state signal.

so question 1: how can ludde nes be ported to mist-board ? do you use simulator?

another FPGA NES is https://github.com/brianbennett/fpga_nes,
this is very easy to port, and very easy to simulate with very little modification.
what is the reason mist-board don't use it?
i also made a version which will use SRAM to place program rom, that is very good for FPGA chip with limited block ram
i also made a windows application will read and display the VGA rgb data generated by simulation, with this application I can debug code without hardware. i want to know if you interested it?
vga640x480.png
You do not have the required permissions to view the files attached to this post.

User avatar
Newsdee
Atari God
Atari God
Posts: 1416
Joined: Fri Sep 19, 2014 8:40 am

Re: about ludde nes port and simulation

Postby Newsdee » Thu Dec 17, 2015 5:56 pm

You can always port it to the MiST as well. If it's easier to develop for because of the simulator then maybe more developers will take a closer look.

The current NES core is pretty good but needs some work on the mapper side of things, especially save RAM. No idea how accurate it is in timing vs. real hardware, but using it feels closer to the real thing than emulators.

thecrazyboy
Atarian
Atarian
Posts: 5
Joined: Fri Dec 11, 2015 3:20 am

Re: about ludde nes port and simulation

Postby thecrazyboy » Fri Jan 15, 2016 5:46 am

Newsdee wrote:You can always port it to the MiST as well. If it's easier to develop for because of the simulator then maybe more developers will take a closer look.

The current NES core is pretty good but needs some work on the mapper side of things, especially save RAM. No idea how accurate it is in timing vs. real hardware, but using it feels closer to the real thing than emulators.

you may misunderstand me.
the simulator I mean is verilog/vhdl simulator like modelsim, not nes simulator running on WINDOWS/LINUX.

User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1255
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: about ludde nes port and simulation

Postby MasterOfGizmo » Fri Jan 15, 2016 9:26 am

Some cores are running in full simulation on a PC. E.g. the BBC micro core can completely run in verilator.

And yes, having a complete simulation environment can speed development up. But as you found out it's not a simple task getting the simulation to run. And simulation gets more difficult the more external components you have which you'd also have to simulate. E.g. the sdram chip and the entire ARM IO controller on the MIST board. You'll somehow have to simulate these as well.

another FPGA NES is https://github.com/brianbennett/fpga_nes,
this is very easy to port, and very easy to simulate with very little modification.
what is the reason mist-board don't use it?


Because noone ported it so far. Porting some core is some days to some weeks work. With another NES core already available on the MIST the motivation to just port another one is not too high. Is that other core actually much better? Did you compare both?
MIST board, FPGA based Atari STE and more: https://github.com/mist-devel/mist-board/wiki

thecrazyboy
Atarian
Atarian
Posts: 5
Joined: Fri Dec 11, 2015 3:20 am

Re: about ludde nes port and simulation

Postby thecrazyboy » Fri Jan 15, 2016 1:43 pm

MasterOfGizmo wrote:Some cores are running in full simulation on a PC. E.g. the BBC micro core can completely run in verilator.

And yes, having a complete simulation environment can speed development up. But as you found out it's not a simple task getting the simulation to run. And simulation gets more difficult the more external components you have which you'd also have to simulate. E.g. the sdram chip and the entire ARM IO controller on the MIST board. You'll somehow have to simulate these as well.

another FPGA NES is https://github.com/brianbennett/fpga_nes,
this is very easy to port, and very easy to simulate with very little modification.
what is the reason mist-board don't use it?


Because noone ported it so far. Porting some core is some days to some weeks work. With another NES core already available on the MIST the motivation to just port another one is not too high. Is that other core actually much better? Did you compare both?


OK, thks.
I will continue to make simulation work, since I don't have any better thing to do.
brianbennett/fpga_nes only support mapper#0, and using block ram, I have added sram support and mapper#2 supporting is in process.
compare to ludde nes, it have more educational purpose for verilog beginer like me.
according to the description, ludde nes is much better. But I can't get it to work. I only have white border on the VGA after downloading the nes file.

User avatar
Newsdee
Atari God
Atari God
Posts: 1416
Joined: Fri Sep 19, 2014 8:40 am

Re: about ludde nes port and simulation

Postby Newsdee » Sat Jan 16, 2016 7:19 am

the existing MiST core already supports several mappers; why not try expanding it with more mappers?

thecrazyboy
Atarian
Atarian
Posts: 5
Joined: Fri Dec 11, 2015 3:20 am

Re: about ludde nes port and simulation

Postby thecrazyboy » Sat Jan 16, 2016 10:09 am

good news,
ludde nes did't work on cyclone4, I just simply replaced origianl weird baudrate uart code with my uart code with standard baudrate.
that one reason I want to simulate it.
today , it works. after I change my old vga monitor to philips lcd monitor.
so I think maybe the vga.v's compatiblity is not very good.

mahen
Captain Atari
Captain Atari
Posts: 219
Joined: Mon Aug 26, 2013 3:11 pm
Location: France

Re: about ludde nes port and simulation

Postby mahen » Fri Feb 12, 2016 10:18 am

Hi ! I just figured out Ludde's NES core was updated. I mean, the MiST port on github, don't get too excited :)

Sadly, for some reasons, compatibility plummeted from almost 100% to something like 10%. Most games give me a grey (or garbled) screen. Any idea what might have happened ?

This version adds keyboard and 15 KHz RGB mode support. I would love if the SELECT and START buttons could be mapped to a key, as I use the db9 interface in my arcade cabinet.

Cheers ! :-)
Amiga user non-stop since 1993 ;-)
Win 1997-2001 / MorphOS 2002-2005 / Linux since 2005

User avatar
vebxenon
Atari Super Hero
Atari Super Hero
Posts: 730
Joined: Fri Apr 24, 2015 12:10 pm

Re: about ludde nes port and simulation

Postby vebxenon » Tue Feb 16, 2016 9:26 am

mahen wrote:Hi ! I just figured out Ludde's NES core was updated. I mean, the MiST port on github, don't get too excited :)

Sadly, for some reasons, compatibility plummeted from almost 100% to something like 10%. Most games give me a grey (or garbled) screen. Any idea what might have happened ?

This version adds keyboard and 15 KHz RGB mode support. I would love if the SELECT and START buttons could be mapped to a key, as I use the db9 interface in my arcade cabinet.

Cheers ! :-)


Yesterday I was testing games (for example, finally I'm able to play Pinbot and High Speed, using the USA versions), and I haven't find any problem. All the games at the SD I have play very very well :) The only games I haven't been able to play are Fantasy Zone I and II, japanese versions. I think it's the mapper.

Regards,

:cheers:
Just a computer and videogame lover :)

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

mahen
Captain Atari
Captain Atari
Posts: 219
Joined: Mon Aug 26, 2013 3:11 pm
Location: France

Re: about ludde nes port and simulation

Postby mahen » Wed Feb 17, 2016 12:38 am

My recent compatiblity issues might be due to the core / firmware combination ? I get a black screen in most games with :

core version NES160107
firmware version ATH160109

when reverting to the previous core, most games work. (VGA)
Amiga user non-stop since 1993 ;-)
Win 1997-2001 / MorphOS 2002-2005 / Linux since 2005

User avatar
vebxenon
Atari Super Hero
Atari Super Hero
Posts: 730
Joined: Fri Apr 24, 2015 12:10 pm

Re: about ludde nes port and simulation

Postby vebxenon » Wed Feb 17, 2016 10:46 am

Is it the firmware_160123? I have no problem using it...
Just a computer and videogame lover :)

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

thecrazyboy
Atarian
Atarian
Posts: 5
Joined: Fri Dec 11, 2015 3:20 am

Re: about ludde nes port and simulation

Postby thecrazyboy » Fri Feb 26, 2016 7:14 am

recently, I have more versions working on my FPGA board
the main chips of this board are cyclone4 ,512k sram ,sdram same as mist-board provided.
because it is not mist-board, I use uart to download the rom, so I has 2 main version.
1. sram + uart with bps from 115200~ 122800, this version is directly from Ludde's NES original code with my uart code
2. sdram + uart with bps from 115200~ 122800, this verison is combination of Ludde‘s NES orignal code + mist-board nes sdram.v + my uart code

thanks the works of ludde and mist-board developpers

but I can't get the modelsim-simulation works


Return to “MiST”

Who is online

Users browsing this forum: No registered users and 2 guests