|
Post by kram16384 on Jun 18, 2005 21:50:59 GMT -5
when will basiegaxorz support backup ram?
it would be nice if you could save games on sega CD.
example: OPTION BACKUP RAM, &h0040000, 600, EVEN
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jun 19, 2005 22:42:52 GMT -5
=D, there's already an option procedure that has the same convention as your example =P. its syntax: option externalram, START ADDRESS, SIZE, EVEN/ODD/BOTH what this option does is it changes the headers of the game so it tells compilers that backup, or external sram will be used (i use the word external because its more general, eg: if people wanted to allocate another portion of ram to different variables). all variables that start with ext_ will be allocated in external ram support for external sram is not very good, in that if the programmer has only byte-long memory (odd or even), it will be hard to utilize because all variables in basiegaxorz assume word-long memory on the static sized bus. in other words, writing an integer to odd (or even) external ram will only write the odd portion of the data. the only way this can change is if i use movep instead of move in assembly generation when accessing this ram, which is hard to do now in the stage of the compiler. as a temporary fix, i'll write different routines to cope with this (like make: WRITEP <variable>, <expression). in the c version of the compiler (which is being worked on now finally), programmers can define different sections of memory to data, code, variables, etc that can use movep instructions for memory on a byte-long bus for now, if ya wanna use backup ram, just use the option parameter, and specify both an odd and even bus so that variables will be written correctly example: option EXTERNAL RAM, &h200000, 16384, BOTH dim ext_playername as string ' declarations optional dim ext_playerhealth as integer print "Last player name:" print " "; ext_playername$ print "HP: "; ext_playerhealth input "Player name? ", ext_playername$ input "Max HP? ", ext_playerhealth print "okay, reset the system!" end i tested this on the beta version and it doesn't work (found a bug 0.o), but shoiuld work on v0.19 edit: saving on sega cd will not be supported because i don't know how the bram works. check the tread devster.proboards22.com/index.cgi?board=basiegaxorz&action=display&thread=1111525766
|
|