First steps into Z88DK...and many more to come!

Discuss game and other programming topics not specifically covered in another forum

Moderator: Programming Moderators

SamusDrake
Posts: 253
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First steps into Z88DK...and many more to come!

Post by SamusDrake » Fri May 04, 2018 8:39 am

I've figured out what I was doing wrong with the make file. Basically, on my linux machine, I set up a "make.sh" file and got so used to that standing in for a make file that I was applying that logic to a real make file(on my windows 10 machine)...I can't believe I overlooked that!

Okay, I can now at least create the main.o file! Phew! I just knew deep down I was doing something wrong. Just got to iron out some more things and I think I'll be alright.

Cheers once again Alvin. ^_^

Alcoholics Anonymous
Posts: 517
Joined: Mon May 29, 2017 7:00 pm

Re: First steps into Z88DK...and many more to come!

Post by Alcoholics Anonymous » Fri May 04, 2018 7:15 pm

ok well at least the problem is known. mingw's make may be ok - it's really just finding something that will work. I was using gnu's for a while but there were some incompatibilities with current make implementations that made me drop it. On windows I'm not using a makefile at all but my tune would change fast if I had a large project being compiled with zsdcc under dev. Compiling a lot of code from scratch with zsdcc takes a while.

I thought maybe codeblocks was creating a Makefile for you but I guess that's not the case. There are some projects under dev that are using makefiles with z88dk but they are not open as of yet so I can't point you to those examples.

The Gandalf game has a Makefile here:
https://bitbucket.org/CmGonzalez/gandal ... ew-default

but it's more complicated than you would need. It generates two versions of the game - one a compressed tap file and another a regular tap file. And there's a lot of other uncommon stuff going on in that project besides. But at least it's a hint.

Of course you can settle for a batch file too. You just lose the incremental compiling.

SamusDrake
Posts: 253
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First steps into Z88DK...and many more to come!

Post by SamusDrake » Fri May 04, 2018 10:03 pm

I think I have got an acceptable working solution now, Alvin.

CodeBlocks, as far as compiling Z88DK goes, is a dead end for the time being. That said, I think its still useful in that I can use it to write the programs and take advantage of syntax highlighting and file management. Then, when I need to compile just execute the make from the command prompt. Once I type "mingw32-make" once, I can just up+enter from there on out...

Oh, just for others, heres the make file I knocked up but sadly I'm having trouble adding a clean recipe which I defintely need to address...

Code: Select all

# VARIABLES
COMPILER = zcc
CFLAGS   = +zx -vn -clib=sdcc_iy -startup=31 -create-app

# RECIPES
run : 
	$(COMPILER) $(CFLAGS) main.c
...I've also been looking over the "arch" headers and there certainly has been a lot more added! O_O You have been busy, Alvin, and how you also find time to respond to the community is just heroic. Its not just me you've given a lot of time to but others as well, so I've noticed. Is Z88DK a full time job or a side venture? I can only assume its the former...

Alcoholics Anonymous
Posts: 517
Joined: Mon May 29, 2017 7:00 pm

Re: First steps into Z88DK...and many more to come!

Post by Alcoholics Anonymous » Sat May 05, 2018 12:46 am

It's hobby time and I haven't actually had a lot of time in the past couple of months... so much to do yet :)

SamusDrake
Posts: 253
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First steps into Z88DK...and many more to come!

Post by SamusDrake » Sat May 05, 2018 6:55 am

Crikey. Do you work with others on Z88DK?

Alcoholics Anonymous
Posts: 517
Joined: Mon May 29, 2017 7:00 pm

Re: First steps into Z88DK...and many more to come!

Post by Alcoholics Anonymous » Sun May 06, 2018 2:24 am

It's an open source project so anyone can contribute but there are four main devs right now. Paulo maintains z80asm, the assembler linker, and some associated tools. Stefano mainly maintains the classic library and some tools. Dom maintains sccz80, the disassembler/debugger, a few other tools, and the classic library. I mainly do the newlib, the zsdcc fork (sdcc is the mother project), and some other tools. But contributions happen everywhere. The project has become quite large over time and is certainly among the most ambitious tooling around for zilog related cpus, commercial or otherwise. Keep in mind it's been around for at least 20 years under the stewardship of different people but in the last two years it has transformed greatly.

SamusDrake
Posts: 253
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First steps into Z88DK...and many more to come!

Post by SamusDrake » Sun May 06, 2018 9:22 am

Well, the effort is certainly appreciated, Alvin - to all who have worked on the project over the years. I for one would never have got this far with retro development without z88dk. On the game development forums the answer was always "you need to be real good at Assembly" and that using C wasn't an option, and so many have been discouraged from "living the dream" so to speak. It just goes to show that we can't always believe what we hear...

Oh, made some progress in SGDK and realised I was resetting the colour palettes after I had loaded them from a bitmap. So, along with the codeblocks issue I'm making progress there too. Hopefully I can now get back to the development work itself!

SamusDrake
Posts: 253
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First steps into Z88DK...and many more to come!

Post by SamusDrake » Sun Jun 03, 2018 4:31 pm

Phew, its been a while. Taken some time out to catch up with the Megadrive, VGM Music Maker, DirectMusic Producer( my long-lost love! ) and going through Derek Morris' Retro Game Dev for the C64. Heresy, I know. Oh, having a huge headache with EHost changing to a new service and so I'll probably have to say adios to my website later in the year. Just when I was ready to start banging out tutorials for the Speccy and Megadrive...

Something has occoured to me while doing this retro development stuff and that is a "real time" game loop. Now that is pretty straight forward with modern systems and languages - get the system time and when ready, do the processing and rendering. Yet the Spectrum and Megadrive are much older systems with far limited resources, and using a bare naked while loop set to true seems absolutely outlandish...

As for the website agro, I'm wondering if I should consider a facebook/tweet and Github combo, as getting a decent domain name is a real headache even when one is willing to throw money at the problem...

User avatar
SevenFFF
Posts: 222
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: First steps into Z88DK...and many more to come!

Post by SevenFFF » Sun Jun 03, 2018 5:01 pm

Not pretending to be any kind of expert, but last time I got a free .com domain and 49c/mo hosting from godaddy. I later switched to Windows hosting which is a bit more expensive. And a no-hassle SSL cert for $5, can’t remember who from.

samusdrake.com is available!

Are you thinking about some hind of real-time os or cooperative multitasking? The loop works pretty well for me. I keep a frame counter, and AND it with 1/2/4/8 etc to schedule things. It works pretty well, especially with NIRVANA where you only have the bottom border available to run all your code.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

SamusDrake
Posts: 253
Joined: Mon Jun 26, 2017 10:11 pm
Contact:

Re: First steps into Z88DK...and many more to come!

Post by SamusDrake » Sun Jun 03, 2018 7:18 pm

Ah, the current site "Codestarlight.com" was real pain in the ass to aquire - it really wasnt a matter of cost but hassle. The first domain name I bought from EHost - actually purchased from them - ended up with Godaddy! Can you believe that? I actually spoke to Godaddy - who were far more helpful in getting to the bottom of the situation( EHost balsed up ) and eventually let that one go and got Codestarlight thereafter. How did you get on with Godaddy, Robin? Were they helpful?

And yeah, I acutally wouldnt mind that domain name come to think of it...got a nice ring to it!

The game loop would just be to make sure the computer wouldnt be over doing things and to lock it into a set FPS. I got a feeling its a different setup to modern systems...

Post Reply