Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on ZX Spectrum 128k with DivIDE #756

Closed
BruXy opened this issue Nov 3, 2019 · 7 comments
Closed

Installation on ZX Spectrum 128k with DivIDE #756

BruXy opened this issue Nov 3, 2019 · 7 comments

Comments

@BruXy
Copy link

@BruXy BruXy commented Nov 3, 2019

Hi guys,

What is the best way to try FUZIX on ZXS+128k with DivIDE (version 5.7c with one CF card)? I am currently using ESXDOS 0.8.7.

Regards,
BruXy

@EtchedPixels
Copy link
Owner

@EtchedPixels EtchedPixels commented Nov 3, 2019

You need a PC partition table on the CF card

Set up one partition for ESXDOS as normal
Set up one of up to 32MB type 7E and put the Fuzix root file system in it
Set up one of say 4MB type 7F and it will get used for swap

Add the FUZIX command into the ESXDOS commands directory
Add FUZIX.BIN to the top level directory of the ESXDOS partition

Boot into ESXDOS, type '.fuzix', cross fingers, hit enter

It's not an ideal machine to run Fuzix on because of the way the memory banking is in one 16K window, but it should work ok.

@BruXy
Copy link
Author

@BruXy BruXy commented Nov 3, 2019

Partitioning

fdisk /dev/sdc

Disk /dev/sdc: 3.7 GiB, 4000317440 bytes, 7813120 sectors
Disk model: Compact Flash   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdc1          2048  264191  262144  128M  b W95 FAT32
/dev/sdc2        264192 6555647 6291456    3G  b W95 FAT32
/dev/sdc3       6555648 6621183   65536   32M 7e unknown
/dev/sdc4       6621184 6629375    8192    4M 7f unknown

Create file system

From: Z80 Root Filesystem (32MB)

wget http://www.fuzix.org/downloads/0.3/rootfs-z80-32.gz
gunzip rootfs-z80-32.gz
dd if=rootfs-z80-32 of=/dev/sdc3
 
65535+0 records in
65535+0 records out
33553920 bytes (34 MB, 32 MiB) copied, 9.36928 s, 3.6 MB/s

Build on Fedora Linux

Note: Do not use sdcc package provided by Fedora, you need to compile Alan's version.

Alan's SDCC installation

git clone https://github.com/EtchedPixels/sdcc280.git
# Few packages were missing, check output of ./configure
dnf install -y boost-devel gputils flex texinfo
cd sdcc280
./configure 
make
make install

Fuzix compilation and installation

git clone https://github.com/EtchedPixels/FUZIX.git

Edit Makefile: TARGET=zxdiv and run make. I am using ZX Spectrum +128k with DivIDE, check Makefile for different target platform. Run make.

Compilation took a while, but after that I have got these two files in build directory:

  • ./Kernel/platform-zxdiv/FUZIX
  • ./Kernel/platform-zxdiv/FUZIX.BIN

Add the FUZIX command into the ESXDOS commands directory and add FUZIX.BIN to the top level directory of the ESXDOS partition on the CF card.

Run FuzixOS

Boot ZX Spectrum to ESXDOS and type .fuzix, it will run new OS in DivIDE's MAPRAM mode. During loading of OS and command the screen border is blinking red/cyan lines. The initial setup will ask for today's date (I have no RTC chip) and for FUZIX partition, in my case, it is hda3. Voilá, ZXS is now running a professional operating system and it is not CP/M!

I have played a bit in the shell. Command ls, cat, file redirects, mount shows /dev/hda3, vi complains with Out of memory message, but cat > file.txt works and Extended+d sending Ctrl+d to TTY. Some commands complain 'too big' for example dc. There is plenty of utilities in $PATH.

My only pitty is, I have no RS232 or NIC connected to my Spectrum :)

@BruXy
Copy link
Author

@BruXy BruXy commented Nov 4, 2019

My build is currently failing on this (any idea @EtchedPixels ?):

make[2]: Leaving directory '/mnt/old_root/usr/local/src/FUZIX/Kernel/cpm-loader'
cc     tools/trslabel.c   -o tools/trslabel
cp hogs.txt hogs.txt.old
cp: cannot stat 'hogs.txt': No such file or directory
make[1]: [cpu-z80/image.mk:52: fuzix.bin] Error 1 (ignored)
tools/memhogs <fuzix.map |sort -nr >hogs.txt
head -5 hogs.txt
24576: _bufpool
9724: _keymap
5465: _sd_spi_transmit_sector
1500: _i_tab
1271: __execve
tools/bihx fuzix.ihx
tools/binprep
Bad format for relocated long call at c306 (e3 cd f8 d2 cd
make[1]: *** [cpu-z80/image.mk:56: fuzix.bin] Error 1
make[1]: Leaving directory '/mnt/old_root/usr/local/src/FUZIX/Kernel'

@EtchedPixels
Copy link
Owner

@EtchedPixels EtchedPixels commented Nov 4, 2019

The zxdiv needs the modified sdcc not the Fedora one. The Fedora sdcc doesn't support banked binaries which is how I stuffed it all into a 128K machine with 16K bankable space.

You need the sdcc from my github.

@BruXy
Copy link
Author

@BruXy BruXy commented Nov 6, 2019

Hi @EtchedPixels

Fingers crossed, FuzixOS is running. I have updated a comment above with the installation steps.

Image of zxdiv

Thank you for your help. Happy hacking!

@BruXy
Copy link
Author

@BruXy BruXy commented Nov 6, 2019

Compiled FUZIX and FUZIX.BIN for target platform "zxdiv":

http://bruxy.regnet.cz/8bit/fuzix/

@EtchedPixels
Copy link
Owner

@EtchedPixels EtchedPixels commented Nov 6, 2019

Yay...

vi is a bit too big - the 128K spectrum I can only really get a 32K user space. I'm trying to squash vi down a bit more but the first squash, removing curses means there is a lot of debugging left to do!

ed should work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.