Author Topic: Binary Trees in PCEAS  (Read 453 times)

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Binary Trees in PCEAS
« on: December 05, 2016, 04:12:46 AM »
How do you guys handle trees in rom? Do you just build the tree with external tools as a data block, and just incbin into PCEAS? With root node being first in the block, and all pointers to child nodes as relative offsets? Or do you use an external program that outputs labels, DBs, etc for PCEAS to directly use?


elmer

  • Hero Member
  • *****
  • Posts: 2153
Re: Binary Trees in PCEAS
« Reply #1 on: December 05, 2016, 06:46:02 AM »
I've not needed to do trees in assembly since abandoning Huffman compression ... but IIRC, folks that have done 3D (and I can only assume that you're thinking about this for 3D) would use completely cooked data with embedded addresses and presented to the assembler as a binary block. Anyone needing that kind of function usually has their RAM/ROM layout decided in advance so they don't need the assembler to fix up data pointer addresses.

If you are thinking about doing some 3D, then I assume that you've seen these pages ...
http://codebase64.org/doku.php?id=base:6502_6510_maths
http://www.ffd2.com/fridge/lib3d/

Our PCE is 7 times faster than the C64 ... a good assembly programmer like you should be able to create something really nice.  :wink:

Now ... if you're using trees for something else, then I'm really curious what.

If you're only needing a small tree, perhaps to describe a branching level structure, then just doing it in PCEAS directly with labels would be easy enough.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Binary Trees in PCEAS
« Reply #2 on: December 05, 2016, 02:39:44 PM »
Quote
if you're using trees for something else, then I'm really curious what.
Just something I wanted to prototype. It might not amount to anything, but it's not 3D related.

Bonknuts

  • Hero Member
  • *****
  • Posts: 3292
Re: Binary Trees in PCEAS
« Reply #3 on: December 06, 2016, 01:34:14 AM »
Dammit. We'll never get Gunboat 2 at this rate.

 Ohh.. there IS a Gunboat 2.. but this time it's 2D.