Request of help for a new emulator

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Request of help for a new emulator
by on (#61168)
Hello everyone, I follow this forum for some months and I finally decided to write to ask you a favor. Having time to lose and wanting to learn the C language, I started working on my emulator and after 3 months of hard work, I finally some results. If anyone has time to lose and wanted to try it, place the links for dowloads both 32 and 64 bit versions. The emulator works only under linux with the SDL libraries installed. I am interested in any problems, graphical glitches, problems of timing, everything. For the moment I'm focused on the ppu and cpu emulation and therefore no sound and input and it also supported mapper 0 (in other words no mapper :)). Unpack the tar file and copy in the same directory the rom with the name "rom.nes", then exec the emulator. Thanks in advance to anyone who wants to try it.
P.s. sorry for my poor english :)

http://drop.io/FHorse8/asset/fnes-32bit-tar-gz
http://drop.io/FHorse8/asset/fnes-64bit-tar-gz
http://drop.io/FHorse8/asset/fnes-win32-zip

by on (#61170)
Well you're lucky I'm on Linux right now (I rarely use it), but too bad I don't know how to run your program. I'm so unfamiliar with linux I can't even run it, sorry. I tried both clicing on it and execute from a teminal, but neither works.

by on (#61173)
Hi Bregalad, create a new directory, uncompress the tar file in, then copy a rom with name rom.nes. In a terminal enter in the directory then type "./fnes.32bit.pal" or "./fnes.32bit.ntsc" (replace 64bit if you have download 64bit version). Or click two time on the name of emulator (important are the rom :))

by on (#61202)
I found a bug in the sdl code that crash the emulator if the bpp of desktopo was not set to 32 bits. Bregalad, this could be that you are not allowed to run program. I solved and i updated the tar file in the first post.

by on (#61203)
Oh I was able to run it. It still looks very early in the development stage, I can't decide which keys are mapped to which controller button, or is the controller emulated at all ?
The raster demo at the start of my game works perfect, which is a good thing.

by on (#61204)
yes, i don't emulate input yet, but i'm working on it now :). This is my first experience with C, sdl, and an emulator then i learn everything from scratch.
Thx for the test Bregalad, When the input are ready i posted here and meanwhile, if you like to try some other roms let me know if you find any problem.

by on (#61205)
Well, the demo Retrocoders : Year Behind (which doesn't require any imput as long as you don't change the song) isn't working at all. You'd want to work on it :wink:

by on (#61206)
I know, idon't emulated illegal opcode yet :)

by on (#61207)
I don't think it uses any illegal opcodes, nor does any other NES programs. Only one guy who comes up with a 3D engine used them.

by on (#61208)
:roll: mmmmm, strange, my emulator tell me that use an istruction with opcode 27 (RLA) that are illegal. Maybe is a my bug. I go immediately to investigate. Thx Bregalad

by on (#61209)
Maybe there is something wrong with your MMC1 bankswitching emulation.

by on (#61210)
well the problem are that i don't emulate MMC1, for now no mappers :) . You are right, fnes are in very early development stage, but I am a guy who works hard, I just need only some time :wink:

by on (#61298)
ok, after a reorganization of the code in order to successfully implement the mappers, I started to integrate mm1. It is not yet complete but the demo Retrocoders: Year Behind works. Bregalad you please try it and tell me if you see a problem of timing? the link in the first post are updated.

by on (#61300)
Sorry but I can't get it to work :(

by on (#61310)
I'm sorry if I keep bothering you, but I tried both versions on a gentoo and ubuntu on and I can't understand why it fails to you. You can try to run it from terminal and can you tell if it gives you an error message or a message?. Many Thanks for your patience.

by on (#61321)
EDIT : Never mind it woks fine. I just didn't overwrite the PAL program correctly.

Congratulation on this it seems your PPU emulation is quite accurate (this demo is known to be hard to emulate I think). Now you can work on input.

by on (#61376)
ok, I finished fully implement the MMC1 (hopefully:)). I have not tried a 1024k rom, can anyone suggest one? And now I can start working on the input.

by on (#61379)
Do 1024k roms even exist? I thought the maximum MMC1 size was 512k. Ignore the crappy overdump of Dragon Warrior 4.

by on (#61382)
+1 Dwedit.

There are no [real] 1024k MMC1 ROMs.

by on (#61390)
ok, having tried both Dragon Warrior 4 and Dragon Quest 4 can be satisfied. Thanks for the info guys

by on (#61397)
This is interesting, I wish i had Linux or Ubuntu or something, All I hear is good stuff about Ubuntu....Hmm...


I really want to do something like a emulator like this but there aren't any good examples on how opcodes are figured out by the values of the numbers, atleast in my research :(

by on (#61455)
Ok, i've added emulation of pad1, only with keyboard for now.
a = button A
s = button B
z = SELECT
x = START
arrow keys = LEFT, RIGHT, UP, DOWN.
Link first post are updates.

by on (#61486)
If someone would try fnes on windows, this is the link to zip file. Uncompress in a directory and then copy a rom with name "rom.nes". I remember that for now as emulated only mapper0 and MMC1.

http://drop.io/FHorse8/asset/fnes-win32-zip

by on (#61488)
Image

I see single screen mirroring isn't supported...

by on (#61489)
what game is?

by on (#61490)
RC Pro Am (PRG1 Version)

by on (#61492)
many thanks, now I try to understand what is wrong.

by on (#61517)
I've found and correct the problem with RC Pro Am (PRG1 Version). Now works well. Link are updates.

by on (#61537)
sorry guy I have a question for you, I discovered an error in the management of sprites that I correct (i hope), and testing Year Behind, instead of the usual orange text, there is blue text that says is a secret message. Look at the screenshot. Someone tell me what it is?

Image

by on (#61563)
all blargg ppu tests are passed. Thx to this test I've found a couple of bugs, than thx to Blargg. I've updated the links if someone would see the Year Behind with blue text and the secret message (that I think it has to do with the zapper).

by on (#61620)
After a reorganization of code I have implemented mappers 2 and 3. The links have been updated.

by on (#61667)
Implemented filter scale2x.

by on (#61733)
Add scale 2x, 3x, 4x.
You can switch between them with the keys 1 to 5.
1 = 1x
2 = 2x
3 = 3x
4 = 4x
5 = scale2x

by on (#66864)
I rewrote the entire graphics routines and have implemented fullscreen (no stretch for now) and added the NTSC filter of blargg (many thx blargg, really good work). the keys are:
1 = 1x
2 = 2x
3 = 3x
4 = 4x
5 = no filters
6 = scale2x
7 = ntsc
, and . = choos type of ntsc filter (composite, svideo, rgc, monochrome)
f = toggle fullscreen
Link on first post are updated.

by on (#66866)
FHorse wrote:
all blargg ppu tests are passed. Thx to this test I've found a couple of bugs, than thx to Blargg. I've updated the links if someone would see the Year Behind with blue text and the secret message (that I think it has to do with the zapper).

Yeah it's supposed to be a secret message that's visible when zapper is pointed at the scroller or something like that. I haven't been able to test this on the real NES as I don't have a zapper but Bananmos should know how it *should* work. It somewhat works in Nintendulator when you attach the zapper to controller port #2. Doesn't seem to work at all in Nestopia...

by on (#66867)
So it's double region coded. Not only does your TV have to be PAL for Years Behind to even work, but it also has to be a CRT to display the hidden message. CRTs sold in NTSC-land are usually NTSC-only, unlike LCDs where it's just as cheap to recognize, parse, and upscale both NTSC and PAL as it is to make separate firmwares per region.
fnes v0.4
by on (#66965)
I've implemented color emphasis. If somoone would try... :)
(thx to the guys of Nintendulator, i've examinate their code to understand well how emphasis work and blargg for the full_palette demo).
Links updated on first post.