ZCC ZX81 WRX Space Invaders

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
BarryN
Posts: 151
Joined: Thu Nov 09, 2017 11:34 pm

ZCC ZX81 WRX Space Invaders

Post by BarryN »

I am trying to compile Space Invaders for the ZX81 using the Z88 development kit (Z88DK). The following are come of the errors generated during the linking phase:

Code: Select all

zcc +zx81  -compiler sdcc -nostdinc -pragma-include:zx81pragma.inc -subtype=wrx -clib=wrx -startup=3 --opt-code-speed build/utils_asm.o build/Point.o build/round_routines.o build/screens_routines.o build/PutSprite.o build/charset.o build/sprites.o build/utils.o build/input.o build/tables.o build/common.o build/round.o build/screens.o build/space-invaders.o build/sound.o -o build/space-invaders -create-app -m
Error at file 'round_routines.asm' line 289: symbol '_getDivideBy12' not defined
Error at file 'round_routines.asm' line 770: symbol '_ClearRows' not defined
Error at file 'round_routines.asm' line 901: symbol '_ClearRows' not defined
Error at file 'round_routines.asm' line 961: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 987: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 998: symbol '_ClearRows' not defined
Error at file 'round_routines.asm' line 1057: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 1073: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 1081: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 1183: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 1231: symbol '_DelayFrames' not defined
Error at file 'round_routines.asm' line 1311: symbol '_GetScreenAddr' not defined
Does anyone know what I need to do to define these symbols?
User avatar
BarryN
Posts: 151
Joined: Thu Nov 09, 2017 11:34 pm

Re: ZCC ZX81 WRX Space Invaders

Post by BarryN »

Well, I changed the OBJECTS= line in the Makefile for the ZX81 from

Code: Select all

OBJECTS=$(OBJS) build/sound.o
to

Code: Select all

OBJECTS=build/Point.o build/screens.o build/Point.o build/screens_routines.o build/PutSprite.o build/sound.o build/charset.o build/space-invaders.o build/common.o build/sprites.o build/input.o build/tables.o build/round.o build/utils.o build/round_routines.o build/utils_asm.o
thus changing the linking order and that seems to have fixed the issue and yes, I know Point.o is listed twice, that is on purpose and is necessary for the linking to work on my Mac.
jjp
Posts: 9
Joined: Tue Jul 20, 2021 1:13 am

Re: ZCC ZX81 WRX Space Invaders

Post by jjp »

it's weird, because OBJ is defined before

Code: Select all

OBJS = 	build/utils_asm.o \
		build/Point.o \
		build/round_routines.o \
		build/screens_routines.o \
		build/PutSprite.o \
		build/charset.o \
		build/sprites.o \
		build/utils.o \
		build/input.o \
		build/tables.o \
		build/common.o \
		build/round.o \
		build/screens.o \
		build/space-invaders.o
then use it in +zx81

Code: Select all

ifeq ("$(TARGET)","+zx81")
	OBJECTS=$(OBJS) build/sound.o
	...
maybe macos make version... maybe must use $OBJS or ${OBJS}
Post Reply