BIN2P + other utils for compiling - Where?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
bobs
Posts: 325
Joined: Thu Aug 27, 2009 10:49 pm
Location: UK
Contact:

BIN2P + other utils for compiling - Where?

Post 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!
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: BIN2P + other utils for compiling - Where?

Post 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
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
User avatar
bobs
Posts: 325
Joined: Thu Aug 27, 2009 10:49 pm
Location: UK
Contact:

Re: BIN2P + other utils for compiling - Where?

Post 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:
User avatar
siggi
Posts: 990
Joined: Thu May 08, 2008 9:30 am
Location: Wetterau, Germany
Contact:

Re: BIN2P + other utils for compiling - Where?

Post by siggi »

Here it is (coming with z88dk)

HTH Siggi
Attachments
BIN2P.zip
(17.79 KiB) Downloaded 298 times
My ZX81 web-server: online since 2007, running since dec. 2020 using ZeddyNet hardware
http://zx81.ddns.net/ZxTeaM
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: BIN2P + other utils for compiling - Where?

Post 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
Post Reply