InformationVery long project with lots of history. Plays (some) NES games! ^_^Content
What this is
HyNES is a Nintendo Entertainment System (NES) emulator (designed to act like the game console) made in Visual Basic that can play games from the system via a ROM Image file (an exact copy of the ROM memory from the game cartridge). The emulator only properly plays some of the first NES games (mapper 0 and 1 IIRC) because I only got around to emulating the system, and not all the crazy cartridge formats (known as mappers). If you’d like to test out the emulator, here is a mapper 0 game that I’m pretty sure no one would care if I included here :-) 1942.
History
I had gotten into emulation in the late 90s, first through two emulators by Bloodlust Software; Nesticle (NES) and Genecyst (Sega Genesis). Both of these pieces of software were solid works of programming art, and there was nothing else out there like them at near the level of polish. (ZSNES did however reach their level of refinement, and beyond, in later years. It was also one of my first emulators, and probably my favorite.)
Then came UltraHLE in January of 1999, which pretty much rocked the emulation scene as it actually played commercial N64 games at real time speeds, having pretty much come out of nowhere with most other N64 emulators barely playing demos at acceptable speeds. Nintendo, feeling blindsided and triggerhappy, immediately sued, which garnered a lot of media attention. I even remember reading about it in Time magazine well after the fact.
I bought my first “3D Graphics Accelerator” for UltraHLE, and delved heavily into the emulation community, making many friends like prominent ROM hacker ACMLM (all his sites are gone now, so no link), whose pursuits weighed heavily on encouraging me to take on this project. He was also a big help in other areas including making the logo for HyNES, and helping me out with some NES stuff from time to time.
So I decided to make a Nintendo emulator (even though there were already a plethora of them at HyNES’ conception in 1999) for multiple reasons including:
- To take on a big project, become a better programmer, and further my programming knowledge. This project incorporated many topics including:
- Advanced 2D graphics and audio manipulation
- Reverse engineering of a processor, audio unit, graphics unit, among other NES systems
- Having to write a CPU emulation core to translate all the OpCodes and perform the proper tasks
- To learn more about the internal workings of computers (I had to learn how every piece of hardware in the NES worked to emulate their functionality)
- To prove that Visual Basic was more powerful than people gave it credit for.
- VB was my programming language of choice at the time (having received it as a present in 1995 when I was 11 after graduating from QBasic :-) ).
- I had the argument with many people that any Programming Language can pretty much accomplish what any other language can, just without the speed. I think I succeeded in this goal, as I had HyNES running at ~230FPS, native resolution, on my 500MHz Pentium CPU with 2 of the 5 sound channels.
- To make an emulator with a lot of bells and whistles so people could see and play with the inner workings of the Nintendo (something that I have never seen another Game Console emulator do), and make ROM hacks.
So I set out first to create a GUI only version (v0.01 alpha) that just outlined what I wanted to accomplish with the project. Unfortunately, one of my staff got a little overenthusiastic and announced the release (Halloween [October 31st] of 2000) to all the emulation news sites. While it was generally praised for its GUI (which I now look back on sometimes and cringe a bit ^_^), many people (mainly other NES emulator authors) thought I was just releasing vaporware, and trying to garner attention for something I never intended to do. The very silly drama that unfolded took a lot out of me and I set the project aside for 10 months. Unfortunately, all of these dramatic problems caused me to lose the news, forum, and hit counter databases for the HyNES site, so I lost a lot of the history.
So 2 months before the anniversary of the first release, I picked the project back up and completely rewrote everything from scratch. I completed everything I wanted from it to my general satisfaction in about 1 months worth of work, and released the new version (v0.9) on the 1 year anniversary (Halloween of 2001). As noted above, I only got in the emulation of most of the actual system (not even all of the sound channels, for example), and didn’t get to all of the ROM Mappers (cartridge formats), so many games remain unplayable or buggy.
I worked on it a little bit more over the next few months, but didn’t make enough progress to warrant another release, and eventually ended up dropping the project; officially announcing its death in June of 2003.
The version I am releasing now (v0.9.1) is at whatever state I left it at back in 2002.
For downloads of all versions, see the first release update below.
v0.01a Screenshots
v0.9.1 Screenshots
Complete Graphics Editing Environment (Contains [Left to Right, Top to Bottom]: Name Tables, View Palette, Base Window, Tile Table, All Sprites, Edit Tile)
Cheats Codes and Game Info (Contains [Left to Right, Top to Bottom]: Base Window, Game Genie, Rom Information, Make Code (In Game Values), Assembly Code)
Custom Palette
Features
Notes about support are red bolded.
- File Menu
- Load File: Loads a ROM (game) into memory for playing
- Not all Mappers supported (#0 is complete #1 is a bit buggy)
- Display and organize by file name and mapper
- Remember last ROM directory
- Log Wave Output: Not currently supported
- Log Video Output: Not currently supported
- Screenshot: Saves a copy of the current screen in the “Saves” Directory
- Dump Name Table: Saves a copy of the Name Tables in the “Saves” Directory
- Dump Tile Table: Saves a copy of the Tile Table in the “Saves” Directory
- Dump Palette: Saves a copy of the current Palette (64 colors) in the “Saves” Directory in 24 bit color format. These can be loaded through Load Palette below.
- Dump ROM: Saves a copy of the current ROM in the “Saves” Directory (This would have eventually been used for when the user edited the ROM’s assembly or VROM)
- Dump Assembly: Saves a copy of the ROM’s assembly code to a text file in the “Saves” Directory
- OpCode Data: A referential list displaying the following information for each CPU assembly instruction: Instruction Number (Byte OpCode), Instruction name, Address type, Ticks (Number of cycles to execute)
- Directories: Set the directory where to store “Saves” (any information generated by the emulator), and set the directory where ROMs are found (this is updated automatically when a new ROM is opened)
- Exit: Close down the program
- Rom Options Menu (Only available when a ROM is opened)
- Free Rom: Closes the currently opened ROM (turn off emulation)
- Pause: Pauses (or resumes) playback
- Advance Frame: Move forward a frame when the emulator is paused
- Reset: Emulates that the “reset” switch was pressed on the NES
- Hard Reset: Emulates as if the system was physically turned off and back on
- View Palette: Views the current in-use color palette. Any colors of the current palette can be edited here. (See “Complete Graphics Editing Environment” for screenshot)
- Name Tables: View the 4 name tables. These are essentially off screen buffers used to provide smooth scrolling. When a tile is left clicked in this window, it is selected in the Tile Table. When a tile is right clicked in this window, the currently selected tile in the Tile Table is put there. (See “Complete Graphics Editing Environment” for screenshot)
- Tile Tables: Views all the current tiles. Tiles can be selected by clicking in this window, or from the Name Tables window. When a tile is selected in this window, it becomes editable in the Edit Tile window (right click a tile to open this window). Images in this window are mapped to the current base color palette. (See “Complete Graphics Editing Environment” for screenshot)
- All Sprites: View all the sprites in the game (these are stored in the ROM). When a sprite is selected in this window, it becomes editable in the Edit Tile window (right click a sprite to open this window). Images in this window are mapped to a monochrome palette, since their actual color will be unknown until the color palette is loaded during runtime. (See “Complete Graphics Editing Environment” for screenshot)
- Edit Tile: Allows editing the palette index mappings for each pixel of the last selected tile from either the Tile Table window or the All Sprites window. Each pixel can be one of 4 possible indexes. The actual color of a pixel is chosen during runtime by combining the selected 0-3 color index with the offset location in the palette. (See “Complete Graphics Editing Environment” for screenshot)
- Save State: Save the game’s exact state to the current Save State Slot. All information about the current state of the NES is saved to a file.
- Load State: Load the game’s exact state from the current Save State Slot. All information about the current state of the NES is loaded from a file.
- Rom Info: Displays the following information about the current ROM: Name (based upon the file), Mapper (Cartridge hardware configuration), File Size in bytes, SRAM (whether the cartridge contains internal storage memory), among some other information. (See “Cheats Codes and Game Info” for screenshot)
- Game Genie: Enter and remove game genie cheats. (See “Cheats Codes and Game Info” for screenshot)
- Make Code (In Game Values): Search for a numeric value in memory, have the value change, and search for the new value. Keep narrowing down memory addresses until the one you are looking for is found, and then change it. Value cannot currently be forced to remain the same. (See “Cheats Codes and Game Info” for screenshot)
- View Assembly: Views the assembly code for the game, and keeps track of the code pointer during runtime. Assembly can’t be edited yet. (See “Cheats Codes and Game Info” for screenshot)
- Wave Output: Not currently supported
- Emulation Menu
- 4 Player: Not currently supported. Do not use this option as it breaks the menu
- Player1/2 (3/4): Select type of controller to use
- None: No controller
- Controller: Normal NES Controller. When selected, this opens up a screen (see Configure Controller Input) that allows modifying what keys the user presses for each button. Each controller button can be bound to 1 keyboard key for a normal press, and 1 keyboard key for turbo pressing. This window can only be opened for 1 player at a time.
- Gun: Not currently supported
- Paddle: Not currently supported
- TV Type: Choose TV information
- NTSC: Set to NTSC (USA - as opposed to PAL, screen has less pixels vertically) format
- PAL: Set to PAL (Europe - As opposed to NTSC, screen has more pixels vertically) format
- Monochrome: Set to monochrome format (shades of gray)
- Layers: Turn on/off layers 1-3 (2 backgrounds, and a foreground [sprite] layer)
- Network for 2 player: Not currently supported
- Enable Sound: Turn on/off sound. Currently only square waves are working, and not triangle waves or the noise or delta channels
- Flip Mirroring: Name table stuff... don’t worry about it
- Options Menu
- Resolution: Change the size of the window. The video automatically scales to fit the window size
- 1X-4X: Change the window size to match a scale of 100-400% of the natural base resolution. (See “Double and normal (base) resolutions” for screenshot)
- Full Screen: Video takes up the full screen. Press ‘M’ (for maximize) to enter/leave this mode. Proper aspect ratio can be lost through this option
- The window can be resized normally by manually dragging the border. Proper aspect ratio can be lost through this method
- Palette: Choose a color palette. This can be used to help match the way the colors look to different TVs
- Frame Skip: Skip (or delay) frames, see also Show FPS
- None(0) - 3: Immediately display frames one after another, skipping the indicated number
- Auto: Automatically match the FPS to NES Timing
- Border Style: How the borders of sub windows animate
- Solid: Display the chosen animation frame number (1-5) for all icons
- Synchronous Rotate: All icons animate together between each frame
- Clockwise Rotate: Each icons next animation frame is the previous icons animation frame
- Enable [Sound] Channel: Toggle specific sound channels to play. Currently ignored
- About: Opens the about window. (See “About Screen” for screenshot)
- Save State: Opens the save state window to choose custom save files. This window seems a little wonky and should probably be ignored. Just use keyboard keys 0-9 to select save state number. See Save State and Load State
- Custom Palette: Create a custom palette by modifying brightness, tint, and hue. The results of this screen are displayed when the “Custom Palette” Palette is chosen. When modifying the sliders, the results can not be seen until the main window regains focus so it can resume emulation
- Message Form: Display backlog of messages (up to 1000). Messages are shown on the video screen when they occur if Show Messages is turned on
- NES Timing: The FPS to run the game at when “Auto” Frame Rate is turned on. Default is 60
- Sound: Sound options. Currently ignored (I think)
- Screen Saver: The screen saver to display when the emulation is paused. Currently only “None” and “Chicken Saver” (and their number) are supported
- Show FPS: Show the current FPS. “FPS” means actual frames being displayed by the emulator. “VFPS” means virtual FPS, or frames that are being rendered, but not necessarily displayed
- Show Messages: Show messages on the screen. These are automatically logged to the Message Form
- Low Run Mode: Use less system resources. Not currently supported
- Custom Mouse: Displays a custom sword mouse. This was implemented in version 0.01a, but is not implemented in current versions
- Always on Top: Keep the main emulation window always on top of other windows
- Other Information
- Emulation automatically pauses when the main window loses focus or the menu is open, and resumes when it regains focus.
- User options are stored in the “hynes.usr” file, which is saved/stored in the same directory as the executable. Please do not try to edit this file.
- Hotkeys for features are listed next to them in their menu. These keys can not be used as keys for controlling the games. The ability to change these keys may come down the road.
- This emulator is known compatible with Windows 98 and XP.
ConceptsEmulation (Which involves too many concepts to list including CPU architecture, sound wave generation, reverse engineering, graphics, and many many more)NotesSometimes people can be real a-holes...UpdatesDakusan License v2.0 @ 2009-11-04 16:06:57 - Download
I have updated the licensing information across the board for my website and all its projects to the Dakusan License v2.0, a slightly modified version of the Original BSD License.
The Copyright page and all project downloads have been updated accordingly. HyNES Release @ 2009-10-17 10:25:47 - Download
Since my website is finally at a state where I feel I can finally announce it to the public, like I’ve been planning on doing for 3 years, I felt I needed to get up a few final projects that I had promised to myself I would get done before that happened. Sooo... *drumroll*.... I finally got HyNES up here, yay!
I thought there were a few minor modifications I still needed to make to the HyNES project before I released it here, but I went back through it, and to my great relief and surprise, it was actually at a completed state with the minor bugs I wanted to crush already fixed some years ago. If I had known that, I might not have procrastinated on getting it up here for 3 years :-).
Unfortunately, the task of getting an initial version of a project released on my website isn’t just fixing up the release itself, but also organizing the content of the project. I’m happy to say I also got the entire content section (as well as miscellaneous info) of the HyNES project page completely flushed out, after spending 8 hours going through old notes, organizing them, and writing everything back up from scratch. Documentation is such a chore :-).
I am releasing all 3 versions of HyNES in this update, as described in the “History” section of the project page.
To add comments, please go to the forum page for this project (guest comments are allowed for the Projects, Posts, and Updates Forums). Comments are owned by the user who posted them. We accept no responsibility for the contents of these comments.
|