Page 1 of 1

[Z80]: 16k org and last known position from drawline/plot

Posted: Thu Jun 20, 2019 12:39 pm
by namco
Just a couple of quick z80 questions:

1) I've got a game I coded for the 48k and uses an org of 30000 but it's small enough to be a 16k title. What org setting should I use to ensure this (as I'm sure that 30000 is too much for the 16k)?
[Edit]: Thinking about it the question should really be what's the lowest org number I can use for maximum memory use on a 16k? I keep forgetting whether the org number is decimal or not!

2) I'm using the draw line function (via Z80) and I've been testing it's drawing through a keypress. I've noticed that it seems to know the last position that was drawn and it carries on drawing from the last point. Where do I find the x,y position of the last plot/draw line?

Thanks.

Re: [Z80]: 16k org and last known position from drawline/plot

Posted: Thu Jun 20, 2019 1:22 pm
by R-Tape
namco wrote: Thu Jun 20, 2019 12:39 pm Just a couple of quick z80 questions:

1) I've got a game I coded for the 48k and uses an org of 30000 but it's small enough to be a 16k title. What org setting should I use to ensure this (as I'm sure that 30000 is too much for the 16k)?

2) I'm using the draw line function (via Z80) and I've been testing it's drawing through a keypress. I've noticed that it seems to know the last position that was drawn and it carries on drawing from the last point. Where do I find the x,y position of the last plot/draw line?

Thanks.
How big is the code?

Either way, CLEAR 23999 and put your code at 24000 is safe (assuming you don't have a sizeable BASIC program as well).

Addresses 23677, 23678 store the last plotted X,Y so you can get or modify the value of these in your program.

Looking forward to seeing the game!

Re: [Z80]: 16k org and last known position from drawline/plot

Posted: Sun Jun 23, 2019 7:20 pm
by namco
Thanks! :)