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

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

releasethedogs
Posts: 4
Joined: Tue Aug 25, 2015 5:15 pm

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

Post by releasethedogs »

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?
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

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?
nesdoug.com -- blog/tutorial on programming for the NES
lidnariq
Posts: 11069
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by lidnariq »

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.
releasethedogs
Posts: 4
Joined: Tue Aug 25, 2015 5:15 pm

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by releasethedogs »

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:
User avatar
freem
Posts: 171
Joined: Mon Oct 01, 2012 3:47 pm
Location: freemland (NTSC-U)
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by freem »

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).
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

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.
nesdoug.com -- blog/tutorial on programming for the NES
lidnariq
Posts: 11069
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by lidnariq »

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.
Attachments
chase-for-modern-cc65-20150825.zip
(67.34 KiB) Downloaded 425 times
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

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) ?
Last edited by dougeff on Wed Aug 26, 2015 6:50 am, edited 2 times in total.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by thefox »

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/
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

Nope, exact same errors.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by thefox »

dougeff wrote:Nope, exact same errors.
What does cc65 --version say? It works perfectly here.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

cc65 V2.15 - Git a85ac88
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

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!
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by thefox »

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.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
dougeff
Posts: 3035
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Want to make a Geocaching puzzle ROM, need help with sou

Post by dougeff »

And I got Shiru's 'hello world' to run (example1.c), with a little effort.
nesdoug.com -- blog/tutorial on programming for the NES
Post Reply