{"id":19090122,"url":"https://github.com/freem/nesmon","last_synced_at":"2026-05-24T15:30:15.849Z","repository":{"id":145429160,"uuid":"42555808","full_name":"freem/nesmon","owner":"freem","description":"a machine language monitor for the NES/Famicom.","archived":false,"fork":false,"pushed_at":"2016-06-01T22:46:09.000Z","size":102,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T22:18:31.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freem.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-16T00:54:26.000Z","updated_at":"2016-06-01T22:46:10.000Z","dependencies_parsed_at":"2023-06-03T18:00:14.618Z","dependency_job_id":null,"html_url":"https://github.com/freem/nesmon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fnesmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fnesmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fnesmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freem%2Fnesmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freem","download_url":"https://codeload.github.com/freem/nesmon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240136998,"owners_count":19753650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:01:50.569Z","updated_at":"2026-05-24T15:30:15.786Z","avatar_url":"https://github.com/freem.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"nesmon - a native NES/Famicom monitor program\n=============================================\n! Super Warning !\nThis is a work in progress and is not \"production ready\".\n\n(Hell, at this point, it doesn't even output keyboard strokes to the screen!\nIt does manage to read them... as long as you're using the Family BASIC\nkeyboard and not the Subor or PEC-586 ones.)\n\n================================================================================\n[Table of Contents]\n 1.      Introduction\n 2.      Versions\n  2.1    Mapper 100 Version\n  2.2    FME-7 Version\n  2.3    NROM Version\n  2.4    Future Versions?\n 3.      Usage\n 4.      Commands\n ?.      Assembling from Source\n\n================================================================================\n1. Introduction\n================================================================================\nnesmon is a machine code monitor for the NES/Famicom. The platform is an odd\nchoice, but I really wanted to see if it could be done.\n\nIt is highly unlikely that you will be able to use this in a full project.\n\nFor those not familiar with the concept of a machine code monitor, please view\nhttp://www.c64-wiki.com/index.php/Machine_Code_Monitor\nuntil I stop being lazy and edit this further.\n\n================================================================================\n2. Versions\n================================================================================\nMultiple versions of the monitor can be assembled. The versions are different\nbased on cart configuration.\n\nIncluded profiles:\n* Nintendulator Debugging Mapper (Mapper 100)\n* Sunsoft FME-7 (Mapper 069)\n* NROM (Mapper 000)\n\n--------------------------------------------------------------------------------\n2.1 Mapper 100 Version\n--------------------------------------------------------------------------------\nThe Mapper 100 version is meant for use in Nintendulator.\nThis is the recommended version to run, as you are able to simulate a RAM cart\nwith the correct settings.\n\n\"Mapper 100 (Debug) Bank Selection\" dialog values for basic RAM cart operation:\n\n(PRG section)\nPRG $6000-$7FFF: 0, RAM(2)\nPRG $8000-$9FFF: 1, RAM(2)\nPRG $A000-$BFFF: 2, RAM(2)\nPRG $C000-$DFFF: 0, ROM(1)\nPRG $E000-$FFFF: 1, ROM(1)\n\nI am not sure what the numbers for the top three banks should be.\n\n(Tile data section)\nCHR $0000-$03FF: 0, RAM(2)\nCHR $0400-$07FF: 1, RAM(2)\nCHR $0800-$0BFF: 2, RAM(2)\nCHR $0C00-$0FFF: 3, RAM(2)\nCHR $1000-$13FF: 4, RAM(2)\nCHR $1400-$17FF: 5, RAM(2)\nCHR $1800-$1BFF: 6, RAM(2)\nCHR $1C00-$1FFF: 7, RAM(2)\n\n(for Horizontal Mirroring)\nCHR $2000-$23FF: 0, Nametable(3)\nCHR $2400-$27FF: 1, Nametable(3)\nCHR $2800-$2BFF: 0, Nametable(3)\nCHR $2C00-$2FFF: 1, Nametable(3)\n\n(for Vertical Mirroring)\nCHR $2000-$23FF: 0, Nametable(3)\nCHR $2400-$27FF: 0, Nametable(3)\nCHR $2800-$2BFF: 1, Nametable(3)\nCHR $2C00-$2FFF: 1, Nametable(3)\n\n--------------------------------------------------------------------------------\n2.2 FME-7 Version\n--------------------------------------------------------------------------------\nSunsoft's FME-7 mapper IC allows for fine-grained 8KB PRG banking and 1KB CHR\nbanking. However, no known FME-7 game uses CHR-RAM, so it's unknown if this\ncombination will work on hardware.\n\nOnly the $6000-$7FFF section may be used as RAM (without modifications?), but\nthe FME-7 allows for 512K total PRG-RAM (banked).\n\n--------------------------------------------------------------------------------\n2.3 NROM Version\n--------------------------------------------------------------------------------\nThe last resort is the NROM version. The only PRG-RAM available is $6000-$7FFF,\nwithout bankswitching. It's worth noting that NROM with CHR-RAM is a very\nunorthodox setup, and may not be supported on every emulator.\n\n--------------------------------------------------------------------------------\n2.4 Future Versions?\n--------------------------------------------------------------------------------\nThere may be other versions in the future. Some are on more realistic boards\nand can be added easily, others will require different branches.\n\nCandidates, in no particular order:\n* Famicom Disk System (Disk System's RAM cart gives 32KB of PRG-RAM at $6000-$DFFF)\n* MMC1 (bankswitchable PRG-RAM, up to 32K)\n* MMC5 (64KB of PRG-RAM, can map $6000-$DFFF to PRG-RAM; MMC5 ICs hard to source)\n* MMC6 (1KB PRG-RAM at $7000-$7FFF)\n* UxROM with PRG-RAM circuit\n* VRC7 (Similar PRG/CHR banking setup to FME-7, but only 8K of PRG-RAM)\n\n2.4.1 Famicom Disk System\n-------------------------\nThe main problem is that the FDS BIOS sits at $E000-$FFFF, and the monitor will\nneed to sit slightly above that. At nesmon's full size (16K), that's half of the\navailable PRG-RAM space, which is less than ideal.\n\nSince a Disk System version would need a different codebase anyways, some of\nnesmon's code could be replaced with calls to the relevant FDS BIOS routines.\n\n2.4.2 MMC1\n----------\nThe MMC1 allows you to have up to 32K of PRG-RAM (banked in 8KB sections).\nHowever, there are only 6 games with 32K of PRG-RAM, and only one of those was\nreleased outside of Japan. (Technically it's five games, as \"Sangokushi II\" and\n\"Romance of the Three Kingdoms II\" are the Japanese/English versions.)\n\nIf you don't want to chop up a Koei cart, your options are even more slim...\nModifying a \"Final Fantasy I \u0026 II\" cart or \"The Best Play Pro Yakyuu Special\"\nare the only other choices.\n\n2.4.3 MMC5\n----------\nThis is another category where Koei games dominate the list of real carts. MMC5\nis also the board that all non-Japanese releases of \"Castlevania III\" are on.\n\n\"MMC5 ICs hard to source\" is noted above. As far as I know, there are no\nhardware clones of the MMC5 available for use on carts. Some flashcarts can run\nMM5 games (with varying levels of support).\n\nNot mentioned above is the 1KB of EXRAM, which can be used for program code\nor data. However, it can also be used for other purposes.\n\nThe ability to map PRG-RAM from $6000-$DFFF makes the MMC5 a decent substitute\nfor a FDS RAM adaptor cart.\n\n2.4.4 MMC6\n----------\nThis is a highly unlikely candidate, but it's listed here for completion.\n\n2.4.5 UxROM with PRG-RAM circuit\n--------------------------------\nAn alternative to the NROM with CHR-RAM setup.\n\n2.4.6 VRC7\n----------\n(todo)\n\n\n================================================================================\n3. Usage\n================================================================================\nnesmon is best used with a hardware keyboard. However, the official keyboard was\nonly released in Japan and will only easily work on Famicoms without hardware\nmodification.\n\nHolding the A and B buttons on controller 1 for 3 seconds will display the\nsoftware keyboard (if it isn't already shown).\n\nHolding Select on controller 1 for 3 seconds will toggle the monitor.\nHolding Start+Select on controller 1 for 3 seconds will reboot the monitor.\n\n================================================================================\n4. Commands\n================================================================================\n(work in progress)\n\n================================================================================\n?. Assembling from Source\n================================================================================\nTo get the most out of nesmon, you'll need to set up a development environment\nfor NES work. Since I use the nonstandard .ignorenl/.endinl directives, the\nsource requires asm6f [https://github.com/freem/asm6f/] to assemble.\n\nLua 5.x is required for running the datetime script.\nI can't reliably guarantee that every system is going to have the GNU datetime\ncommand (nor Lua, but it's easier to get Lua installed on other OSes), so I'm\nusing a simple Lua script for generating the date and time.\n\nThe build process uses a Makefile, but each command can be run without needing\nGNU Make.\n\nWith GNU Make, the process is simple:\n1) Start a terminal/command prompt.\n\n2) cd to the nesmon \"src\" directory.\n\n3) Open \"Makefile\" in a text editor and edit any customization options.\n\n4) Open \"config.inc\" in a text editor and edit any customization options.\n\n5) Run one of the following commands:\n 5.1) \"make all\" (or just \"make\")\n This will build all of the targets mentioned below (aside from clean)\n\n 5.2) \"make nrom\"\n This will create an NROM configuration of nesmon.\n\n 5.3) \"make m100\"\n This will create nesmon for the Nintendulator Debugging Mapper (mapper 100).\n\n 5.4) \"make fme7\"\n This will create a FME-7 configuration of nesmon.\n \n 5.5) \"make clean\"\n This will delete the binaries and .nl files. Don't run this one the first time :p\n\n6) Find a way to run the tool.\n\nFor emulators, you just run the NES image.\nIf you're using the Nintendulator Debugging Mapper (mapper 100), remember to\nopen the \"Game\" menu, set the options above, hit \"Apply\", then Reset the system.\n\nThe hardware side, is, well, harder. Pun aside, you'll need to have some way of\nloading nesmon (preferably with a custom RAM cart). I currently do not have any\nschematics or plans for such a cart, though a RAM cart (or flash cart) could work.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreem%2Fnesmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreem%2Fnesmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreem%2Fnesmon/lists"}