Page 1 of 1

BIN2P + other utils for compiling - Where?

Posted: Sun Dec 13, 2009 9:43 am
by bobs
In another post somebody mentioned a utility for *UNIX called BIN2P for converting a complier output to a ZX81 friendly .P file. I'd like to start writing games for the ZX81, and currently use PASMO as my Z80 compiler, but it has no facility to write .P file. The utility needs to be for Windows though, not *UNIX.

Also, being new to this (usually in my retro life I'm a Spectrum programmer ) is a .P file all I need? Do I need a BASIC loader for it, or is there a tool to automate that?

Any & all help much appreciated!

Re: BIN2P + other utils for compiling - Where?

Posted: Sun Dec 13, 2009 11:07 am
by siggi
I recommend to use a C-compiler like z88dk to make programs for a Zeddy.
This compiler uses libraries adapted for the ZX81 and knows about the ZX81's special hardware/interrupt features (e. g. that the IX and IY register are used by the NMI-routine are not saved on stack, so they may not be used by the compiler or within libraries).

z88dk has also option to make a dummy-BASIC-program to hold the compiled code in a REM line and thus could create P-files directly. It is available for Linux and Windoofs ;)

HTH Siggi

Re: BIN2P + other utils for compiling - Where?

Posted: Sun Dec 13, 2009 2:15 pm
by bobs
I get your point, but I'm not a great fan of using libraries (nothing against Z88DK), and would rather be in control of every aspect of my code and to actually learn the finer points of ZX81 programming. However good a compiler, it's still not going to be as good as writing Z80 directly, and besides, coding in C / C++ would make my hobby too much like my day job! :lol:

Re: BIN2P + other utils for compiling - Where?

Posted: Sun Dec 13, 2009 6:29 pm
by siggi
Here it is (coming with z88dk)

HTH Siggi

Re: BIN2P + other utils for compiling - Where?

Posted: Tue Dec 15, 2009 8:35 am
by sirmorris
Hi Bobs,

check out this thread: viewtopic.php?t=133

I've posted a template and info about compiling directly to P format in assembler. Check the entire thread for an errata :oops:

HTH

Charlie