Are you an MSX-developer?

Página 4/4
1 | 2 | 3 |

Por konamiman

Paragon (1037)

Imagen del konamiman

12-03-2009, 16:05


I think D-Tail has replied very well, but anyway, an alternative for the variables stuff is to save them in mapped memory. You don't need a single line of ASM for this, as NBASIC allows to copy memory from BASIC RAM to mapped ram and vice versa.

I remember having done this in one big NBASIC development I did in the past, to save variables and restoring them when executing a different BASIC program. The strategy I use is to declare a single array of integer variables instead of multiple single variables; this way, I can copy all the variables to/from mapped memory with a single step. The starting address of the array can be obtained with the VARPTR command.

Por SLotman

Paragon (1211)

Imagen del SLotman

12-03-2009, 18:27

some one said that i can poke the ram outside the basic area to put these variables, but my knowledge
in asm is ZERO.

I did! You don't have to learn ASM for that! Just plain BASIC!!

Instead of myvar = 0, do:

poke &Hd000,0

to store the value (0 in this case, on address d000h) and to read it back, just do:


This will return the value stored on &Hd000. You can do it to every BYTE value (0-255); if you need values higher than that (256->65535) then things get more complicated, and wont help much Sad

The only thing is to know where everything is stored (since you're using NBASIC or TurboBASIC/KunBASIC), so you don't overwrite anything.

You can even store whole arrays with this method. Instead of DIM A(300), just peek/poke from address 0100h-022Ch (which is normally DOS memory area). Just don't count on every byte there starting as ZERO as every variable on BASIC, you can have any crazy value there Wink

To read any value from this "memory array", just do a peek &H100 + (array_num)! Ex: to read array pos 120, do a v=peek(&H100 + 120). Pretty simple, no? Smile

Por RobertVroemisse

Paragon (1235)

Imagen del RobertVroemisse

13-03-2009, 15:01

I "do" MSX for the same reason's Wolf "does". I am a graphical designer and work with powerfull tools and computers on a daily basis. So, for me, It's nice to make pictures on MSX because of the limitations the system has. And because of the big bucks that can be made with MSX software nowadays ofcourse... Running Naked in a Field of Flowers

Por pitpan

Prophet (3131)

Imagen del pitpan

13-03-2009, 17:19

Indeed! High profits are a constant in MSX development Wink I don't understand why Konami quit, it would be making tons of cash with the newest Proevolution Soccer versions for MSX LOL!

Página 4/4
1 | 2 | 3 |