This page is exclusively reserved for any comments/question related to Destiny Hunter.

3 thoughts on “Comments

  1. Hello, friend. How I can save screen background and move objects without erase (like game) in TRS-80 ? In BASIC I can with PEEK and POKE or only Assembly ?


    1. If possible, consult my PDF document here. It is not specific to TRS-80, but gives general outline of the strategy I used for moving objects on the text screen:

      Unfortunately I think BASIC PEEK/POKE will be too slow (unless maybe you just use a very small portion of the screen, like maybe 10×10 only). My code was in C language that was compiled to Z80 assembly.
      The approach I used is not quite “double buffered” (like more modern systems will use that with H/W support for it)… In my approach I keep a copy of the map in memory (so that’s use 1K RAM). Then I have two “scratch pad” sections of memory: a bit mask to mark which cells have been modified, then another sections of RAM reserved to store which locations (x,y) were modified (and the target symbol to modify them to). The length of that RAM just depends on how large of icons/cells you want to support (I chose vector of 34). But for performance reasons with these limited 1mhz processors, the real “trick” was avoiding any / (divide) and % (multiply) call by using pre-computed tables (like when deciding which cell_state bit corresponds to which x/y screen coordinate).

      Sorry it’s not a real easy explanation. I think the same concept could be done in BASIC (using DIM and DATA statements to reserve RAM for tables), and the same bit-logic could be used — but it’ll be interpreted and just won’t be able to run fast enough at 1mhz to be a smooth movement.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: