- Member: Members
- Active Posts:
- 26 (0.01 per day)
- Most Active In:
- Engineering & Reverse Engineering (19 posts)
- 02-January 07
- Profile Views:
- Last Active:
- Feb 20 2009 11:17 PM
- Member Title:
- Void where prohibited
- 103 years old
- December 24, 1909
- On the profile form there are two spots for gender... maybe I should set them both different for lols?
- National Flag:
Topics I've Started
20 January 2007 - 01:56 AMI recently found a thread here about using SRAM, so I decided I'd try to do some simple incorporations of SRAM into sonic1. My first tests worked well - simple things to make sure it worked - I made it so if you did the level select code once, it would from then on make you start with 17 lives - proved I got the SRAM working right.
Next I tried to make it at the end of every act (in the Obj3A_NextLevel: section) save what level you were on, the number of lives, and an extra number that was always the same (#117) so when the game tried to load it could check for that number to make sure there was really a save and it didn't try to load nonsense.
And I also added some code in the PlayLevel: section to check if #117 was in the memory, then it would load the lives and level number into the RAM. (Currently I haven't set up an option to allow choosing of a save-slot, or playing a new-game - I'm just trying to get this to work right now)
But whenever I try to compile, I get errors such as "s1comb.asm(3547) : Error 15030 : Cannot fit value 88 into signed byte". If I go to that line, it's just in the middle of the sounds part - where there's a lot of incbin commands. Nothing I touched.
And oddly, if I comment out two or three commands, the thing will compile fine, and work exactly as should (except for whatever I commented out - IE I commented the lines that clear how many emeralds the player has on start).
The ASM file is at - http://am49.frih.net/sonic/sonic1.asm - it's based from the 2005 S1 Disassembly. All of the changes are in the header (to enable SRAM), under PlayLevel:, and Obj3A_NextLevel:. There are a few comment changes and organization changes also, but nothing else that affects the compiled form.
Anyone help with my problem?
Agent ME hasn't added any friends yet.