Example project posted for NESICIDE

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Example project posted for NESICIDE
by on (#80957)
I finally got FTP access back on my website, so I posted an example project for NESICIDE using tepples' "Russian Roulette" project as a basis.

(I also posted a new NESICIDE V1.004 windows installer because I made it possible to add multiple files at once to a project).

The project contains an example breakpoint (whenever the variable "cur_turn" is read or written), and an example watched symbol (the symbol "cur_turn"). Breakpoints and watched symbols are kept in the project file so they persist between application runs.

1. Open NESICIDE.
2. Select File->Open Project and navigate to russian_roulette.nesproject from the example project. (Or, drag-and-drop it onto the running application).
3. Hit the toolbar icon that looks like a gear and has the tooltip text "Compile Project". (Alternatively, hit F5).
4. Hit the toolbar icon that looks like a memory card for a camera (I know) and has the tooltip text "Load in Emulator". (Alternatively, hit F6).
5. Hit the toolbar icon that looks like a green play button and has the tooltip text "Run". (Alternatively, hit F7).

The program should execute for a tiny bit and then the CPU RAM Inspector should open and snap to the address 0x0018.

6. Open the Symbol Inspector dock by selecting Debugger->Symbol Inspector menu item. You should see the symbol "cur_turn" listed.
7. Play Russian Roulette. Depending on how you have your debugger updates set up you may or may not see the cur_turn symbol's value updating in "real time". It will always update when the emulator is paused. If you want to try to see real-time updates you can change that setting in Environment Settings (File->Environment Settings, Debuggers tab). I know NESICIDE is a bit of a performance hog, setting it for real-time debugger updates makes it even more so.

Toggling between paused/running state of the emulator is done with F7, the play/pause buttons, or the play/pause menu items under Emulator menu.

8. Modify the example code. If you type in gibberish, hit "Compile" (or F5) and there are errors, you'll see the errors listed in the Output dock. Click on an error to take you to the file/line, and fix it.

Any time after you hit "Compile" (or F5) you'll need to hit F6 to load a successful built image into the emulator. I might automate this if the build is successful, but I figured for failed builds it doesn't make sense to try to load anything.

Currently there's an issue on Windows with the "Clean Project" because GNU make in Windows can't find "rm" and I'm having a heck of a time figuring out how to get it to do a "del" instead. For now just ignore "clean".

EDIT: added link
Re: Example project posted for NESICIDE
by on (#80958)
cpow wrote:
GNU make in Windows can't find "rm"

Then add MSYS to your Path. If you don't have MSYS, install it using devkitPro Updater.

Quote:
and I'm having a heck of a time figuring out how to get it to do a "del" instead.

To call Windows Command Prompt's built-in commands, you need to prefix them with cmd /c: cmd /c del somefile.ext otherfile.ext. Or you could just make your own tiny reimplementation of rm.exe.
Re: Example project posted for NESICIDE
by on (#80959)
tepples wrote:
cpow wrote:
GNU make in Windows can't find "rm"

Then add MSYS to your Path. If you don't have MSYS, install it using devkitPro Updater.

Quote:
and I'm having a heck of a time figuring out how to get it to do a "del" instead.

To call Windows Command Prompt's built-in commands, you need to prefix them with cmd /c: cmd /c del somefile.ext otherfile.ext. Or you could just make your own tiny reimplementation of rm.exe.


Thanks tepples I knew there was a solution out there. I'll look into MSYS. Seems vaguely familiar from another project long long ago...

I tried the cmd /c route but then ran into all sorts of slash orientation problems because Qt uses / by default. I was in slash hell.

Oh, and many thanks for the project to use as a basis! 8)

At some point I need to do an MMC1 example.