Author Topic: [tutorial]Setting up a development envriroment with spasm in linux  (Read 2663 times)

0 Members and 1 Guest are viewing this topic.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Assembler
So one of the issues with developing z80 in linux is that you have to find a good assembler. There are a few out there, but usually they have to be run with wine or they do not have all the great additions that modern assemblers have.
Well you can compile Spasm from source to run on any linux system and not only get the speed gain, but all the nice features! (SVN)

Editing
So now you have an assembler. What now? Well you need to be able to edit your files, now any text editor will do, but syntax highlighting really helps. (gedit) (kate)

Making assembling easier
So it's annoying to type out ./spasm <input> <output> all the time. Why don't we make a script to do it for us?
#!/bin/bash
path/to/spasm flags path/to/input path/to/output
There we go, nice and simple! now you can chmod +x path/to/script it and you can execute it however you like :D ( so command line or double clicking it ).

Debugging
So now we want to fix our errors, what do we do? wxwabbitemu, while certainly great for emulating, does not have any debugging capabilities yet. So you can use that for things that require you to test responsiveness. For all the hardcore debugging you still need to use wine and wabbitemu.

Conclusion
Now we can easily program z80 on linux, and with TiLP we can also send to our calc to test on real hardware. Z80 dev isn't just for windows anymore!

EDIT: You can get a pre-built copy here of spasm for Ubuntu/Mint (Download)
« Last Edit: July 03, 2011, 03:55:43 am by Eeems »
/e