Jump to content





Photo

Stuck on Text Adventure...

Posted by Kiwi, 09 September 2010 · 26 views

I kinda knew something would happen at the halfway point. I think one of the toughest problem programming this game, I can't tell where the data are going on the RAM. That's a problem with C language I believe. Therefore, I don't know if the RAM are just floating there or they'll be overwritten, or writing after the used spot. I can send data to a specific spot of the Colecovision video memory, but not RAM. The ROM size is 17KB, so going over that makes the game loops right after the title screen been drawn. If the ROM size is under that, it'll be fine. There's about 12 table for pattern, color, and name table. Sprite table are made seperately because it is difficult to add RLE data to it. Now the functions may be too big. There are about 8 -12 variables in the whole thing just for scripting event. Why would the RAM be filled up even if the function aren't being used. Declaration? Sigh, each void statement is 2 byte, table data are suppose to be read only and RLE compression use about 16-32 byte of RAM. There's no way it would be full. Could it be NMI issue ><. I'm going to play around with that RAM issue see if I can clear it right at the logo screen, and after the title screen loads up. Well, I had a lot of fun making the graphics and toying around getting it under 32KB when complete. I'll eventually find a solution, either learn assembly so I have more control, or continue trying to solve the issue. I'll read the CV programming book more closely and learn more about RAM functions.

Meanwhile, I'm going to start another game. I committed to fulfill my dream working on a limited system.




Does your emulator of choice have a built in debugger? You'll need to understand some Z80 assembler to track this bug down.
  • Report

GroovyBee, on Thu Sep 9, 2010 3:28 AM, said:

Does your emulator of choice have a built in debugger? You'll need to understand some Z80 assembler to track this bug down.

Yes, Meka and BlueMSX both have debugger. Meka have real time RAM update, while BlueMSX only update when it is paused. Kinda hard to debug with Blue MSX because it doesn't skip 1 frame. It seems like the ROM address from FFFF to about C000 and under have FF value in it. The game seems to read the whole cartridge. I will have to look up at assembly document to understand Z80 assembly code and find out what those register do.
  • Report
What I've done for my own copy of the 7800's ProSystem emulator is to add a virtual debug port. My code writes to specific memory locations and the data in those writes appear in a file on the PC. The ProSystem emulator does not have a debugger so this method is very crude but it does allow me to follow the execution path. Maybe you could add a similar feature to your favourite emulator (if source code exists for it) or ask its author to make you a special debug version.

Unfortunately tracking down weird bugs when you aren't familiar with assembler on these old systems is going to be hard.
  • Report

February 2012

S M T W T F S
   1234
56789 10 11
12131415161718
19202122232425
26272829   

Recent Comments