Please try my NES emulator HDNes

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

21-4-2013:
1. Added more detailed log for GLSL errors.
2. Replaced some deprecated code in GLSL.

rainwarrior, sorry to keep you waiting. I think nVidia is more picky with versions and deprecated features, so I updated the shaders. Please, can you try it again? Make sure to replace the files in the shader folder. Thank you.

nesguru, thank you for your encouragement! The graphics pack has the following rules:
1. A folder with the same name as the rom file inside the same directory.
2. Image files in PNG format in the folder. All pixels which are not fully transparent are treated as fully opaque.
3. A text file named "hires.txt" in the folder.
4. The text file contains lines of text and each line begin with a tag surrounded by "<" and ">".
5. A "scale" tag is followed by a number, which defines the scale factor of the pack. Valid values are 1, 2 or 4. If this tag does not exists, the default scale is 2.
6. A "img" tag is followed by the file name of an image file.
7. A "tile" tag is followed by 8 values separated by comma.
8. The first value is the tile ID in decimal. This is the distance between the first byte of the tile and the beginning of CHR ROM, or the beginning of PRG ROM if it is a CHR RAM game, divided by 16. The data of a 16 pixels tall sprite is counted as 2 tiles.
9. The second value is the index of the image which contains the replacement graphics, also in decimal. The first image listed in this file has an index of 0 and the second image has as index of 1 and so on.
10. The next three numbers are colors of the palette used by the tile, in decimal. The ordering of the 3 colors is significant and each tile can not have multiple replacement tiles for the same colors and ordering.
11. The next 2 numbers are the x coordinate and y coordinate of the top left corner of the replacement tile within the image, measuring from top left corner of the image, in decimal.
12. The last value indicates whether this replacement tile is used as the default(Y) or not(N). If the emulator renders a tile and cannot find a replacement with an exact match (tile ID and 3 colors), then the emulator will use the default tile with a matching tile ID. Each tile can not have more than one default replacement.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Please try my NES emulator HDNes

Post by rainwarrior »

I had the same problem, but the log has three of these:

Code: Select all

Failed to link shader program
Interpolation of texcoord does not match 
 in vertex and fragment shaders.
Really easy to fix with a smooth in your fragment shaders. So, I did that and now it's working fine.

My next suggestion is that if there's a shader error you should print the name of the shader as well.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

Thank you for fixing that!
User avatar
Macbee
Posts: 120
Joined: Sat Nov 26, 2011 8:31 am
Location: Brazil
Contact:

Re: Please try my NES emulator HDNes

Post by Macbee »

I'm very happy to know about this project! :D
Are you planning to make graphics replacement easier on future versions? I tried to change 'Batman' title screen with no success.
I still have to adjust/ move / resize tiles to get an accurate 2x title screen - but my goal was to have something like this:

Image

I would love to change NES graphics using tools similar to HiSMS emulator.
HiSMS is so easy to use that even a newbie like is able to achieve good results (like http://www.youtube.com/watch?v=FeegmIt03nM and http://www.youtube.com/watch?v=X6lGV5VE ... WW9PGylqjj )

Good luck om HDNes and congratulations! :D
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

Wow, I didn't know about HISMS and it is doing more or less the same thing as HDNes. Thank you for telling me this!

Now that I read the HISMS tutorial, I have 2 ideas that I think are not too difficult to implement:

1. The save screen function. I originally wanted to use this as the main method of extracting tiles from the game. But I think it would be too difficult to capture every single frame of the animations or special effects like that. So I programmed the emulator to generate the data automatically. However the drawback is that when an object is composed of many tiles, the emulator will not wait for the whole object to appear, so the object is split into many screen shots. I think I can add the save screen function so we can use either.

2. Direct screen mapping function. Similar to Auto generate, but instead of packing the tiles, the emulator generates two images per screen shot (one background, one sprite) and the tiles are placed in the image at the same location as the screen, so it will be easier to work with.
User avatar
Macbee
Posts: 120
Joined: Sat Nov 26, 2011 8:31 am
Location: Brazil
Contact:

Re: Please try my NES emulator HDNes

Post by Macbee »

mkwong98 wrote:Wow, I didn't know about HISMS and it is doing more or less the same thing as HDNes. Thank you for telling me this!

Now that I read the HISMS tutorial, I have 2 ideas that I think are not too difficult to implement:

1. The save screen function. I originally wanted to use this as the main method of extracting tiles from the game. But I think it would be too difficult to capture every single frame of the animations or special effects like that. So I programmed the emulator to generate the data automatically. However the drawback is that when an object is composed of many tiles, the emulator will not wait for the whole object to appear, so the object is split into many screen shots. I think I can add the save screen function so we can use either.

2. Direct screen mapping function. Similar to Auto generate, but instead of packing the tiles, the emulator generates two images per screen shot (one background, one sprite) and the tiles are placed in the image at the same location as the screen, so it will be easier to work with.
Yay! Hope to see these features on HDNes. I'm crazy to make some HD Nintendo hacks :D
Please download HiSMS later. You'll see the conversion process is really easy. You basically have to:
1) Take a screenshot
2) Change the screenshot graphics using an image editor
3) Overwrite the original screenshot with this redrawn image
3) Insert it back to the game with the click of a button

I'll watch this topic. Thanks and congratulations again! :)
leosmendes
Posts: 2
Joined: Tue Apr 23, 2013 5:10 pm

Re: Please try my NES emulator HDNes

Post by leosmendes »

Mkwong98 Hello, I would like to congratulate the initiative and say that I am extremely excited about his work. A long time ago I had the same idea but I have no knowledge to do it, I came to propose this in the forum kegafusion, even before they appear the hisms but was ridiculed and even booed by Some fanatics to the original, but these same I downgraded, I make use of filters for better image. Although you can not make it work on my pc (ATI HD core2quad + 59720 + Win7x64) I only get a black screen, but I was very happy to see the forum a screen nes "using high resolution sprites." wish I could help in some way if I can give my humble opinion, I would say not to re-invent the wheel ... we already have an excellent emulator nes well optimized and open source code, the "Nestopia" then it would not be appropriate to take advantage of what is already ready and integrate their ideas? is viable or not you want to have a project of its own, at least use it to streamline the consultation process programming. else if possible catalog versions file name to be made available for download. again good job!
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

28-4-2013:
1. Changed the generate data function so tiles which are partially outside the screen will not be recorded.
2. Fixed a bug with HD pack when a 16 pixel high sprite drop out of the screen (eg big Mario drops into a pit)
3. Added pause and unpause key.
4. Added a run one frame key.
5. Added a manual mode to data generation and added a manual generate data key.
6. When a screen shot is choosen, the emulator will generate HD pack data with tiles matching the actual screen shot. However currently this only works with background tiles as sprite tiles can be flipped and can overlap with other tiles.
7. Fixed a problem with nVidia graphics card. Thank you rainwarrior!

Thank you Macbee for showing me HiSMS.
leosmendes, thank you for your encouragement.
leosmendes
Posts: 2
Joined: Tue Apr 23, 2013 5:10 pm

Re: Please try my NES emulator HDNes

Post by leosmendes »

mkwong98 wrote:28-4-2013:
1. Changed the generate data function so tiles which are partially outside the screen will not be recorded.
2. Fixed a bug with HD pack when a 16 pixel high sprite drop out of the screen (eg big Mario drops into a pit)
3. Added pause and unpause key.
4. Added a run one frame key.
5. Added a manual mode to data generation and added a manual generate data key.
6. When a screen shot is choosen, the emulator will generate HD pack data with tiles matching the actual screen shot. However currently this only works with background tiles as sprite tiles can be flipped and can overlap with other tiles.
7. Fixed a problem with nVidia graphics card. Thank you rainwarrior!

Thank you Macbee for showing me HiSMS.
leosmendes, thank you for your encouragement.
thanks , now work om my pc
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

A quick video of the emulator in action:
http://youtu.be/N57ApspYHVE

I'm thinking of an easier way to handle palette swaps, so I'm not showing the fire flower or the star power up. Other than that, world 1-1 is done. And I just use a microphone to record the sound from the speaker, so please excuse the bad sound track.
User avatar
James
Posts: 431
Joined: Sat Jan 22, 2005 8:51 am
Location: Chicago, IL
Contact:

Re: Please try my NES emulator HDNes

Post by James »

That's pretty cool. Nice job! :beer:
get nemulator
http://nemulator.com
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

16-5-2013:
Added a function to handle palette swaps if not using auto generate. If you have a sequence of tiles with the same palette and that sequence of tile also have the same palette swaps, then you can use this function to simplify the process.

First, make sure your HD renderings of the same palette are stored in the same image file. The same tile in different palettes must be placed in the same location relative to the first tile of that palette. Then add tile mapping for the first palette as usual. After that, click the 'Batch mapping' to open a dialog box. Select the image file of the first palette and select the first tile and the last tile of the sequence. Then select the new palette, the image file of the new palette and the location of the first tile within the image file. Click 'Add mappings' and the program will add mappings to the new palette for all the tiles between the first and the last, using the new location of the first tile as reference.
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

11-7-2013
1. Fix a save state crashing bug
2. Fix displaying 16 pixel high sprites
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

19-7-2013
Fixed sprites not showing during gameplay in Kirby's Adventure
mkwong98
Posts: 282
Joined: Mon May 30, 2011 9:01 pm

Re: Please try my NES emulator HDNes

Post by mkwong98 »

Finished the HD pack for SMB! See the first page for a screenshot of the ending screen.
Post Reply