Category: dev


ZX Spectrum NIRVANA Engine z88dk Demo running on Spectaculator Emulator on iPad Air

IMG_0009 nirvana engine test on spectaculator ipad 20140412-154820

ZX Spectrum NIRVANA Engine z88dk Demo running on Spectaculator Emulator on iPad Air

I have added an initial debug screen to my version of the z88dk NIRVANA demo

IMG_0010 nirvana test debug info spectaculator iPad

ZX Spectrum NIRVANA Engine z88dk Demo with my start screen debug info

Info on NIRVANA Engine for ZX Spectrum by Einar Saukas can be found here http://www.zxshed.co.uk/sinclairfaq/index.php5?title=NIRVANA_Engine and here http://www.worldofspectrum.org/forums/showthread.php?t=45538

To run in Spectaculator iOS App, Save snapshot from Fuse as .szx file
Copy and rename as ~/Library/Mobile Documents/F4332SF2XY~com~spectaculator~Spectaculator/Documents/Saved Games/48K BASIC.tzx/Saved 48K BASIC (1).szx

~/Library/Mobile Documents is basically a local copy of your iCloud data. See http://macdailynews.com/2012/08/06/how-to-access-your-icloud-files-from-your-macs-finder/ for more info

Following on from the z88dk Xcode Project post below, the following steps describe how to set up an Xcode External Build Project to Edit and Compile Boriel ZX Basic .bas and .asm source files (Xcode version 5.1.1 is used below but should still work with earlier versions)

1. Launch Xcode
2. File->New Project
3. Select Other->External Build System
4. Click Next (screen dump)

5. Enter Project Name e.g. zxbasic-spectrum-test
6. Enter Build tool /bin/bash
7. Click Next

8. Choose a directory to create files in and click Create

9. Copy .bas and .asm files and zxbasic-zxspectrum-my-project-name-build.sh file to project directory created by Xcode

Example zxbasic-zxspectrum-my-project-name-build.sh file can be found here

10. Add files copied above to Xcode Project via Cmd-Opt-A (screen dump)

11. Change .bas files Type in Xcode sidebar to Pascal (or any of the other source code file types) to enable syntax highlighting (screen dump)

12. Edit zxbasic-zxspectrum-my-project-name-build.sh file and edit Exec Name

Z80EXECNAME=my-project-name

Note: PATH declaration is included as Xcode doesn’t pick up PATH from .bash_profile, .profile etc.

PATH declaration /usr/local/bin/ is added for mapmaker (part of z88dk distribution)

13. Save zxbasic-zxspectrum-my-project-name-build.sh

14. Click on Project in Xcode and Click Target->Info
15. Enter zxbasic-zxspectrum-$(PROJECT_NAME)-build.sh as Arguments
16. Enter $(SRCROOT) as Directory (screen dump)

17. Click Product->Build to run zxbasic-zxspectrum-my-project-name-build.sh

The following steps describe how to set up an Xcode External Build Project to Edit and Assemble z88dk .c and .asm source files (Xcode version 5.1.1 is used below but should still work with earlier versions)

1. Launch Xcode
2. File->New Project
3. Select Other->External Build System
4. Click Next (screen dump)

5. Enter Project Name e.g. z88dk-spectrum-test
6. Enter Build tool /bin/bash
7. Click Next (screen dump)

8. Choose a directory to create files in and click Create

9. Copy .c and .asm files and z88dk-zxspectrum-my-project-name-build.sh file to project directory created by Xcode

Example z88dk-zxspectrum-my-project-name-build.sh file can be found here

10. Add files copied above to Xcode Project via Cmd-Opt-A (screen dump)

11. Change .asm files Type in Xcode sidebar to Assembly (to enable syntax highlighting screen dump)

12. Edit z88dk-zxspectrum-my-project-name-build.sh file and edit Exec Name

Z80EXECNAME=my-project-name

Note: PATH declaration is included as Xcode doesn’t pick up PATH from .bash_profile, .profile etc.

PATH declaration /usr/local/bin/ is added for tapmaker

13. Save z88dk-zxspectrum-my-project-name-build.sh

14. Click on Project in Xcode and Click Target->Info
15. Enter z88dk-zxspectrum-$(PROJECT_NAME)-build.sh as Arguments
16. Enter $(SRCROOT) as Directory (screen dump)

17. Click Product->Build to run z88dk-zxspectrum-my-project-name-build.sh

Note: To add additional Build targets (e.g. ZX81) duplicate the ZX Spectrum target and change the name of the .sh file in the argument to the name of the zx81 build .sh file (screen dump)

Example z88dk-zx81-my-project-name-build.sh file can be found here

also edit the Scheme names in Projects->Schemes->Manage Schemes to match the target names

Pixel scrolling text ticker example for ZX Spectrum

zasm source code file https://dl.dropboxusercontent.com/u/17590589/Ticker-tap.zasm

Assembled tap file https://dl.dropboxusercontent.com/u/17590589/Ticker-tap.tap

assembler source formatted as z88dk include file https://dl.dropboxusercontent.com/u/17590589/Ticker-library.asm

zasm can be found here http://k1.dyndns.org/Develop/projects/zasm/distributions/

z88dk can be found here http://www.z88dk.org/forum/

To create a .tap file from a ZX Spectrum BASIC text .bas source file, Download the applescript below and Edit the location of the zmakebas executable in the property at the top of the script

zmakebas.scpt

Then copy to

~/Library/Application Support/BBEdit/Scripts/

and it will appear in the BBedit script menu

Open the .bas text file in BBEdit and select zmakebas from the Script menu

the resulting .tap file will be opened in Fuse

fuse zx spectrum emulator can be found here Fuse – the Free Unix Spectrum Emulator

Download and compile zmakebas 1.2

source code can be found here Source Package: zmakebas (1.2-1.1)

In Terminal:

cd ~/path/to/zmakebas-1.2/
make
sudo make install

To test

zmakebas -o demo2.tap -n demoname demo.bas

Double-click .tap file to load in Fuse

here are some example ZX Spectrum BASIC programs:

flags-example-extended.bas

basic-fill.bas

advanced-graphics-listing-1-4.bas

fuse zx spectrum emulator can be found here Fuse – the Free Unix Spectrum Emulator

To assemble a .zasm source file, Download the applescript below and Edit the location of the zasm executable in the property at the top of the script

Assemble zasm.scpt

Then copy to

~/Library/Application Support/BBEdit/Scripts/

and it will appear in the BBedit script menu

here is an example .zasm Z80 Assembly source file for ZX Spectrum to get you started

zasm can be found here http://k1.dyndns.org/Develop/projects/zasm/distributions/

fuse zx spectrum emulator can be found here Fuse – the Free Unix Spectrum Emulator

I have now moved from editing and assembling .zasm Z80 Assembler files using the custom-written zasm-cocoa app and I am now using BBEdit with a custom Z80 Assembler BBEdit Codeless Language Module plist

to use, put this .plist file

Z80 Assembler BBEdit Codeless Language Module.plist

in

~/Library/Application Support/BBEdit/Language Modules/ folder

zasm can be found here http://k1.dyndns.org/Develop/projects/zasm/distributions/

fuse zx spectrum emulator can be found here Fuse – the Free Unix Spectrum Emulator

audio-slicer-quicktime v0.4.1

audio-slicer-quicktime v0.4 link

Takes an audio file (e.g. .mp4, .mp3, .aiff) and slices it up into a series of smaller audio files that are then (optionally) opened in iTunes

audio-slicer-quicktime v0.4 source Xcode project link

zasm-cocoa 0.2 link

Cocoa wrapper app for zasm Z80 Assembler. Uses zasm 3.1.14 and UKSyntaxColouredText v0.2

Fuse ZX Spectrum Emulator for Mac OS X link

zasm-cocoa 0.2 source code Xcode project link

Follow

Get every new post delivered to your Inbox.