New target tutorial/classic +z80 target

Discussion about other targets
Post Reply
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

New target tutorial/classic +z80 target

Post by dom »

Having noted a few people tripping over adding a new target to z88dk and the +z80 target only being available for newlib I thought I'd spend a Sunday afternoon documenting things and hopefully making life easier.

There's been a fair bit of chatter about the newlib vs classic over the past year or so, and the conclusion arrived out was that for new projects and targets classic is the way to go, it's much easier to understand, get running, supports more targets, supports more CPUs and there's a very good chance I'll be able to answer the question with the correct answer(!)

One of the things that was lacking from classic was a bare-bones target, we have +embedded but it wasn't particularly obvious how to use it, +test is pretty low level but may not offer the flexibility needed. As a result I've added the +z80 target into classic. It's reachable by adding one of the following options: -clib=classic, -clib=8080, -clib=8085, -clib=ixiy, -clib=r2ka which means it becomes easier to add support for home-brew targets that don't run on a z80.

I've also written a tutorial that's located here: https://github.com/z88dk/z88dk/wiki/Classic--Homebrew it covers a two use-cases: first of all a machine with a monitor or some sort of OS where software is loaded into RAM, and secondly a machine that doesn't have anything and z88dk is required to generate a ROM.

The tutorial aims to get the console up and running, and shows a couple of approaches to doing it. Towards the end, I talk about customising both the existing crt0 through tuning pragmas, and wholesale replacement of the crt0 as needed.

This conceptually leads very neatly onto the traditional retargetting page here: https://github.com/z88dk/z88dk/wiki/Cla ... targetting which by the point you get to it, all you have to figure out is make and lst files.

Any feedback is welcome and I hope it's helpful for people.
WORP3
Member
Posts: 26
Joined: Thu Dec 29, 2022 12:51 pm

Re: New target tutorial/classic +z80 target

Post by WORP3 »

Great to see that new information has been added, overall a nice overview in the making :) I guess the problem in documenting something like z88dk is to try and guess what the people are going to be using for. Nevertheless good article!
Post Reply