View Full Version : One Step Closer...
KingMike
06-12-2004, 12:10 AM
Yes. SRAM (the ROM having been hacked to standard NES saving) save/load has been successful. :jumping-smiley21:
Taking it one step further...
Kinda wondering how feasible a little load menu might be too make...
as I kinda like having multiple save slots.
I think the important thing I would need is something to set the WRAM save/load address high byte at startup.
So, what do we got left...
The title screen, and a couple minor (hopefully) gfx fixes.
And also check into that text speed issue. Not a real biggie, though. I don't think it's horrendously slower than the original game (but it's noticable).
byuu64
06-12-2004, 12:35 PM
Yay for being able to save! I think the load menu sounds way hard. You may be able to do it, however. Are you able to write enough code to create the menu itself? It sounds like a real challenge getting all that extra code into the original game, given the limited space and lack of JSL opcode ;) But the result would be pretty damn cool nonetheless...
I'm having the same issue with the Japanese->English speed of text rendering thing.
I was personally going to make it either render line by line, or render two or more characters at a time, and hope that the result isn't noticeable. I think it's just that it has to vsync once per frame that locks you to no more than 60 characters per second, but hopefully I can find something like you're looking for that purposely slows it down even more, and disable it. Because it doesn't seem like I'm getting anywhere near 60 letters printed a second at present...
KingMike
06-12-2004, 01:47 PM
Going off the topic for a second, I did get a rough concept of a title screen done.
But I'm not very artistically talented within the space of the original graphic design. Here's my hour or so attempt. If anyone can create a better 176x72 graphic that says "MONSTER STORY", I'd be interested to see and maybe use it.
Well, I've found where the game goes after pressing Start on the title, specifically the check for whether Start or Contiune was selected.
I'm thinking at that I point I jump out to my code (somewhere out in the expanded ROM space. I believe I've got the 5 bytes necessary to do a page swap), clear out the nametable/sprite table, and go to my own print functions.
Then when selections have been made, reload the original ROM bank, jumping back to the old code.
I've been able to at least code a small from-scratch NES demo (one I hope to turn into a game someday), that at least prints a whole screen of graphics, and moves a sprite around the screen, reacting to the controller.
So I'm having confidence I can get a load screen made. Probably not a save screen, as I doubt the screen would refresh later. Fortunately, the start/continue check is during a blue screen, and it would need to refresh itself after (either to draw the name screen or main game screen) I'll have to force a selection of a page of WRAM at the start, and put the page number in a variable. Then when it comes time to save, that would become the WRAM page number to save to.
And when selecting a file, the selected WRAM page would be selected.
I'd just need to set the high byte of WRAM, and then pass it back to the SRAM load code that I got working. Then just pass back the text speed variable (and the start/continue variable), and link it back up with the start/continue ASM.
Well, anyways, that title, if anybody wants to help by trying their luck at a better design. (Ignore the cursor bugs. I suppose if I can get a file screen written, the cursor and text won't be necessary :lol: )
byuu64
06-13-2004, 09:15 PM
I definately love the 'Shell' text in the banner, I'm iffy on the Monsters story text... I know it has to curve like that for the whole mountain shape thing, but I dunno... Story seems a little spacey, but I think it's needed, otherwise monsters would be too wide, and story too crushed.
Overall tho, I like it. I'd say it's more than enough to get the job done, and far more than I could ever do :D Just trying to be honest and point out any negatives I can, rather than the typical 'Oh, it looks....great' response people like to do.
And yeah, I can feel the pain for the save screen. One idea would be to figure out how the game does its option windows (say like Yes/No, etc.) and make one for Slot1-3 pop up. Even that would be really difficult, though. What about completely hardcoding a routine that, when you select to save the game, it locks the screen (since it's your own code, you probably wouldn't be able to update the sprite animations, etc., but that wouldn't look too bad), clears the textbox, puts up slot1-3 in the text box itself, and you write your own code to handle the cursor, then when you're done, clear the window again and give control back to the game?
Also, wasn't aware you were writing your own demos for the NES, that's pretty cool :)
I've always wanted to make an SNES game, but I fear I'll get lost in the small detail whenever my engine starts to get big. I have a hard time making a really really solid base, and by the time I do, I lose interest :/
KingMike
06-14-2004, 09:18 AM
The problem is I haven't quite figured out how to handle writing to text where the screen scrolls.
I suppose I could rewrite the line shown just before the save routine is accessed
"Certainly I can write that
down..."
to
"Certainly I can write
that down. Where?
1 2 3"
Then put in a cursor sprite.
Maybe, though I'll finish up the load screen first.
Got the hardcodable stuff on file 1 down (the othe 2 will be mostly just repeat code with a couple variables changed). Now I gotta get a good idea of how the variables are stored (particularily, the party arrangement. Which 1 of the 4 is active, who is in the active party).
I think once the screen is drawn completely, it should be just a matter of getting button input to change a few variables, and link back to the main game.
Next step I plan, reading the level, VP, MP variables and converting them from hex to decimal for display.
Progress so far...
byuu64
06-14-2004, 11:54 AM
Yeah, I like your idea more. Example:
Certainly, I can save your progress.
Where to?
<new window>
Slot 1
Slot 2
>Slot 3
You could just use the game's code to print the slots, then add a tag or something in the Slot1-3 text window to lock the game in your routine [hook this where the game loads the text from the rom, or better, when writing the letter to the screen], which would be a small routine that prints the cursor -directly- to the screen, and captures up/down/a button keys. Maybe erase the cursor/clear the window when done?
Minor suggestion in that you may want to make the BG blue for the load screen, to match the title screen? Also, USING ALL CAPS MAKES IT LOOK LIKE YOU ARE YELLING, kthx ;)
Converting hex to decimal is pretty straightforward, here's my quick attempt at doing it on a 6502. Note that this is hardly the fastest way to do it. But I don't think you're going to be too concerned with speed, to render ~20 variables, right? :)
EDIT: the code tag screwed up the indenting, sorry... way to go, phpbb programmers!
hextodec() {
lda #$00
sta dec_value0
sta dec_value1
sta dec_value2
loop:
lda hex_value
cmp #$0a ;if >9, increment 10's
bcs +
sta dec_value0;otherwise, we're done
lda dec_value0;convert value to
clc : adc #$30;a real number, change
sta dec_value0;#$30 to wherever 0 is
lda dec_value1;in your table.
clc : adc #$30;the table should be
sta dec_value1;0123456789 and -not- 1234567890
lda dec_value2
clc : adc #$30
sta dec_value2
rts ;return from subroutine
+ sbc #$0a ;subtract 10
sta hex_value;and store result
inc dec_value1;increment 10's
lda dec_value1;check for overflow
cmp #$0a ;if >9, reset 10's
bcc loop
inc dec_value2;increment 100's
lda #$00
sta dec_value1;reset 10's
bra loop
}
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.