Want to make a Geocaching puzzle ROM, need help with source.

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Want to make a Geocaching puzzle ROM, need help with source.
by on (#154047)
Hi there.
I want to use the open source chase.nes (LINK) to make a geocaching puzzle rom.
The idea is the user would have to play through X levels before being prompted with a screen that shows Latitude and Longitude coordinates and a space to input a password. The user would then have to quit the game, use their gps to go to the coordinates and find the password. They would then have to come back home. play the game again and input the password. the game would continue for X levels more before the game is complete. At the end of the credits it would tell a final location to the actual geocache in which case the user could go and find the cache and sign the log.

Only thing is, I have NO idea how to do this. I assume its fairly straightforward because the game code is already written, more levels would have to be made and the password screen would have to be created. Anyone want to help me?
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154053)
Hello.

All the things you said are doable. I find the people here are very helpful, and would love to assist you, but I also find that you get much better responses if you ask specific technical questions.

Let me ask you a bunch of annoying questions...
1. Have you ever programmed a game? Or modified one?
2. Are you familiar with the NES or 6502 programming?
3. Have you ever used cc65 or ca65 or ASM6 or NESASM or any other NES compiler?
4. Are you trying to figure out where to start on any of this?
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154054)
Just a little warning: the game only comes with 5 levels as-is. You'd probably want to make some more.

One other thought: if the person who receives the game image is technically savvy, they may find it easier &// more tempting to cheat than to play the game.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154072)
dougeff wrote:
Hello.

All the things you said are doable. I find the people here are very helpful, and would love to assist you, but I also find that you get much better responses if you ask specific technical questions.

Let me ask you a bunch of annoying questions...
1. Have you ever programmed a game? Or modified one?
2. Are you familiar with the NES or 6502 programming?
3. Have you ever used cc65 or ca65 or ASM6 or NESASM or any other NES compiler?
4. Are you trying to figure out where to start on any of this?


You might want to try again if you were going for "annoying" questions. those questions all seem reasonable to me.
Anyway, I haven't programed a game. I made a few programs in BASIC in High School but is been 15 years. I have done some rom hacks with editors though. And yes, I'm just looking for someone to help me. I have no idea where to start or what to do. I mainly got the idea from StarTropics - if you've played that game randomly in the middle of the game you have to input a password thats in the manual. That got me thinking.

lidnariq wrote:
Just a little warning: the game only comes with 5 levels as-is. You'd probably want to make some more.

One other thought: if the person who receives the game image is technically savvy, they may find it easier &// more tempting to cheat than to play the game.


Yeah. I read the programers document and it seems like levels can just be drawn with his application and saved as a "name table". That's easy enough to do if i'm understanding it right. I just need to find a computer that runs windows. :P I figure i'll make like 30 total levels. as for hacking the code out, im not too worried about that. If it happens, then they are only cheating his or her self. Plus, they might be able to cheat that part but they still have to crawl three quarters of a mile through a large drainage pipe to get to the final geocaching location. :lol: :lol: :lol:
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154073)
releasethedogs wrote:
Yeah. I read the programers document and it seems like levels can just be drawn with his application and saved as a "name table". That's easy enough to do if i'm understanding it right. I just need to find a computer that runs windows. :P

NES Screen Tool works pretty good in WINE, at least from my experience. Could also use a virtual machine if you don't want to dedicate a physical computer to Windows (and you have the computing power).
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154076)
Another word of warning. By coincidence, I started trying to use cc65 last week, and I could not get any of Shiru's stuff to compile correctly into an NES file.

cc65 is a bit user un-friendly. And has 3 steps, and requires many files to be working together, and configured properly for the version of cc65 you are using...C code compiled with cc65 to ASM code, then ca65 assembles it to an Object file (or many), and then ld65 turns object files into NES file using .cfg file and .lib files. (take my info with a grain of salt, I've been using it for 1 week). I think I'm using a different version of cc65 than Shiru used, and none of the versions I found were totally compatible.

The only way I could get anything to work beginning to end with C code, was to compile it with cc65, and then cut and paste the ASM code into an existing ASM file that I know will assemble correctly with my copy of ca65. I just ignored all of Shiru's .lib files and .cfg files and ran ld65 with files that I knew worked with my copy of ld65.

Not to discourage you, just to let you know that if you're using Shiru's source code, you may have a few bumps along the way to getting it to compile correctly.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154078)
Shiru had said that the contents of runtime.lib are just a subset of the plain cc65 nes runtime. So it was easy enough to repeat the process and use ar65 to reassemble a new subset library. (Yes, I had to dig up an older copy of cc65—easy, thanks to git—to get the list of what objects were in it, but after that it was easy.) Yes, I verified that chase.nes still builds and plays through.

So, here's chase.zip, slightly modified to build cleanly against modern cc65. Still does the weird thing where cc65 produces assembly instead of object files, but whatever. I even added a makefile.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154081)
Wow, thanks lidnariq.

Actually, it didn't work for me...just the usual error messages...
game.c(228): Warning: Unknown pragma 'bss'
game.c(229): Warning: Unknown pragma 'data'
ld65.exe: Error: Wrong data version in 'runtime.lib'
etc. errors because it couln't make a game.s or game.o file.

And that was using the most recent version of cc65. Don't worry about trying to fix this for me, I can use other programs...

'releasethedogs' are you able to run the 'compile.bat' file (after you put the chase source files in a folder in the cc65 folder) ?
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154082)
dougeff wrote:
Actually, it didn't work for me...just the usual error messages...
game.c(228): Warning: Unknown pragma 'bss'
game.c(229): Warning: Unknown pragma 'data'
ld65.exe: Error: Wrong data version in 'runtime.lib'

This means you're using a fairly old version of cc65. Use the Windows snapshot from http://cc65.github.io/cc65/
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154083)
Nope, exact same errors.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154084)
dougeff wrote:
Nope, exact same errors.

What does cc65 --version say? It works perfectly here.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154085)
cc65 V2.15 - Git a85ac88
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154086)
Wait, that's the weirdest thing...I had to restart my computer for another reason...and when it came back up, I was able to run the compile.bat file. I'm looking at Chase in FCEUX now. The only thing I did between the 2 events was to uninstall the old version of cc65. But they were in completely different folders, so that shouldn't have affected it.

Thanks again!
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154090)
dougeff wrote:
Wait, that's the weirdest thing...I had to restart my computer for another reason...and when it came back up, I was able to run the compile.bat file. I'm looking at Chase in FCEUX now. The only thing I did between the 2 events was to uninstall the old version of cc65. But they were in completely different folders, so that shouldn't have affected it.

Maybe the old version was in PATH before the new version, causing it to take priority.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154094)
And I got Shiru's 'hello world' to run (example1.c), with a little effort.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154111)
dougeff wrote:
'releasethedogs' are you able to run the 'compile.bat' file (after you put the chase source files in a folder in the cc65 folder) ?


from what I understand .bat files are only for DOS/Windows
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154128)
.bat is the extension for shell scripts in Windows Command Prompt. If the script doesn't do anything tricky, sh compile.bat might even work.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154129)
This is why I added the makefile.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154130)
tepples wrote:
If the script doesn't do anything tricky, sh compile.bat might even work.

Not a fan of this approach. Behavioral differences could lead to some pretty nasty things happening.
Re: Want to make a Geocaching puzzle ROM, need help with sou
by on (#154149)
Ok got this WINE thinggy. I'll see if I can run NES TOOL to make more level later tonight.