Skip to content

zmc Target for Z88dk

January 10, 2016

Z88dk is working a bit using the embedded target and i’m now going to try for a distinct target for the Z80 Membership Card. I’m following along with new instructions from the z88dk forums.

I have:

  • added zmc.cfg to h:\apps\z88dk\lib\config\
  • unzipped a set of files to  h:\apps\z88dk\libsrc\_DEVELOPMENT/target/zmc/
  • renamed the files with “temp” in their names to zmc
  • changed temp to zmc anywhere it occurs within the files
  • edited 3 .lst files in H:\apps\z88dk\libsrc\_DEVELOPMENT\target\zmc\library to remove the sound library which needs some work.
  • edited H:\apps\z88dk\libsrc\_DEVELOPMENT\winmake.bat and makefiles to include the zmc target
  • run winmake in that directory
  • copied embedded_CRT_99.m4 and .asm to zmc_CRT_99.m4 and .asm in H:\apps\z88dk\libsrc\_DEVELOPMENT\target\zmc\startup
  • edited  H:\apps\z88dk/libsrc/_DEVELOPMENT/target/zmc/zmc_crt.asm to add a startup=99 option and to make startup=99 the default.

I can now run a compile with just zcc +zmc testembed.c and get a functioning bin file.  This still seems wildly complicated but I can’t argue with success.


# zmc.cfg: Target configuration file for z88dk for the Z80 Membership Card

# Asm file which contains the startup code (without suffix)
CRT0		 DESTDIR\lib\zmc_crt0

# Any default options you want - these are options to zcc which are fed
# through to compiler, assembler etc as necessary
OPTIONS		 -vn -O2 -SO3 -I. -DZ80 -DZMC -D__ZMC__ -D__ZMC -M -clib=sdcc_iy --max-allocs-per-node200000 --list

CLIB     default -ltemp_clib -lndos
CLIB     new -D__SCCZ80 -Ca-D__SCCZ80 -Cl-D__SCCZ80 -nostdlib -IDESTDIR/include/_DEVELOPMENT/sccz80 -Ca-IDESTDIR/libsrc/_DEVELOPMENT/target/zmc -lzmc -LDESTDIR/libsrc/_DEVELOPMENT/lib/sccz80 -Cl-IDESTDIR/libsrc/_DEVELOPMENT/target/zmc -crt0=DESTDIR/libsrc/_DEVELOPMENT/target/zmc/zmc_crt -z80asm-sections
CLIB     sdcc_ix -compiler=sdcc -D__SDCC -D__SDCC_IX -Ca-D__SDCC -Ca-D__SDCC_IX -Cl-D__SDCC -Cl-D__SDCC_IX -nostdlib -IDESTDIR/include/_DEVELOPMENT/sdcc -Ca-IDESTDIR/libsrc/_DEVELOPMENT/target/zmc -lzmc -LDESTDIR/libsrc/_DEVELOPMENT/lib/sdcc_ix -Cl-IDESTDIR/libsrc/_DEVELOPMENT/target/zmc -crt0=DESTDIR/libsrc/_DEVELOPMENT/target/zmc/zmc_crt
CLIB     sdcc_iy -compiler=sdcc --reserve-regs-iy -D__SDCC -D__SDCC_IY -Ca-D__SDCC -Ca-D__SDCC_IY -Cl-D__SDCC -Cl-D__SDCC_IY -nostdlib -IDESTDIR/include/_DEVELOPMENT/sdcc -Ca-IDESTDIR/libsrc/_DEVELOPMENT/target/zmc -lzmc -LDESTDIR/libsrc/_DEVELOPMENT/lib/sdcc_iy -Cl-IDESTDIR/libsrc/_DEVELOPMENT/target/zmc -crt0=DESTDIR/libsrc/_DEVELOPMENT/target/zmc/zmc_crt



From → Olduino/Z

Leave a Comment

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 )

Google+ photo

You are commenting using your Google+ 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: