FUZIX.git
9 years agoMakefile: use our new linker and tool setup
Alan Cox [Thu, 1 Jan 2015 14:36:16 +0000 (14:36 +0000)]
Makefile: use our new linker and tool setup

9 years agobinprep: build the right binary
Alan Cox [Thu, 1 Jan 2015 14:33:54 +0000 (14:33 +0000)]
binprep: build the right binary

For the moment we keep the old build method for old style binaries
(no _STUBS area), but for banked ones we expect the platform specific
make Image to do something intelligent. Given that the banking is pretty
much platform specific magic it has to be this way.

9 years agozx128: fix remaining escaped "uzi"
Alan Cox [Thu, 1 Jan 2015 14:33:36 +0000 (14:33 +0000)]
zx128: fix remaining escaped "uzi"

9 years agoKernel: remove remaining uzi references
Alan Cox [Thu, 1 Jan 2015 14:03:46 +0000 (14:03 +0000)]
Kernel: remove remaining uzi references

In particular we don't want any escaped UZI defines floating around in case
we try and create any shared tools/libs with UZI180 or similar.

9 years agokdata: UZI_SYSCALL_COUNT -> FUZIX_SYSCALL_COUNT
Alan Cox [Thu, 1 Jan 2015 13:38:44 +0000 (13:38 +0000)]
kdata: UZI_SYSCALL_COUNT -> FUZIX_SYSCALL_COUNT

Start pulling out the legacy UZI_ values. We don't want them confusing things
when we've got toolchains that support both UZI and FUZIX.

9 years agobankld: initial hackery to create a banking sdldz80
Alan Cox [Wed, 31 Dec 2014 22:30:15 +0000 (22:30 +0000)]
bankld: initial hackery to create a banking sdldz80

The modifications here are

- emit a modified ihx file format giving the bank identifier, so that we can
  split the .ihx files and generate a set of bin files for the overlaid areas.

- spot and output extra inter-bank relocation entries into the modified ihx
  file that can be read and processed by binmunge.

The follow basically is

Link with modified sdldz80
Run bihx

This produces
relocs.dat - relocation between banks
common.ihx - ihx file for the common bank
bank[123].ihx - relocation for the banks

and then reprocesses the ihx files into .bin versions using makebin

binmunge the reads the relocs.dat and patches the resulting binary data
to use RST in place of CALL and stubs for the rest

9 years agobinmunge, bihx: SDCC banking hacks
Alan Cox [Wed, 31 Dec 2014 22:01:43 +0000 (22:01 +0000)]
binmunge, bihx: SDCC banking hacks

These two tools are the first parts of the hacks to make SDCC generate banked
binaries. It's not a full automatic banker but it's a first step.

sdldz80 is modified to spit out a bihx format, which is a file that contains
lines of the format

XX:Intel IHX - Intel ihex from the : for bank XX
:Intel IHX  - Intel ihex for all the banks used
Bxxxx - Inter bank relocation record

Currently it is hard coded to understand the following segments

CODE "bank 1" - banked code
CODE2 "bank 2" - banked code
CODE3 "bank 3" - banked code
VIDEO "bank 3" - banked code
FONT "bank 3" - data
INITIALIZER common  - data
DATA common  - data
CONST common  - data
COMMONMEM common  - code
DISCARD "bank 3" - banked (discard) code

calls are patched from CD xx xx to use RST8/16/24 xx xx according to the
bank in question. References to banked objects that are made from data
areas or are JP rather than call instructions are fixed up by changing the
vector to point to a 4 byte stub for each problem case that is of the form
RST xx xx RET.

This generates more stubs than we really need right now. Most of them will go
away if the system call table is moved into its own file and we add some
kind of 'DATA2' segment.

9 years agoselect: further filling out .. not there yet
Alan Cox [Tue, 30 Dec 2014 23:13:34 +0000 (23:13 +0000)]
select: further filling out .. not there yet

Pipe bugs need fixing before we can really do select

9 years agozx128: vt and kbd ioctls
Alan Cox [Tue, 30 Dec 2014 19:06:59 +0000 (19:06 +0000)]
zx128: vt and kbd ioctls

9 years agotrs80: kbd and vt ioctls
Alan Cox [Tue, 30 Dec 2014 19:06:45 +0000 (19:06 +0000)]
trs80: kbd and vt ioctls

9 years agopcw8256: vt and kbd ioctls
Alan Cox [Tue, 30 Dec 2014 19:06:29 +0000 (19:06 +0000)]
pcw8256: vt and kbd ioctls

9 years agonc100: add vt/kbd ioctls
Alan Cox [Tue, 30 Dec 2014 19:06:10 +0000 (19:06 +0000)]
nc100: add vt/kbd ioctls

9 years agomtx: add keyboard/vt ioctls
Alan Cox [Tue, 30 Dec 2014 19:05:50 +0000 (19:05 +0000)]
mtx: add keyboard/vt ioctls

9 years agomsx2: add vt/kbd ioctls
Alan Cox [Tue, 30 Dec 2014 19:05:27 +0000 (19:05 +0000)]
msx2: add vt/kbd ioctls

9 years agodragon: vt/kbd ioctl support
Alan Cox [Tue, 30 Dec 2014 19:04:59 +0000 (19:04 +0000)]
dragon: vt/kbd ioctl support

9 years agotty: add ioctl numbers for vt/kbd ops
Alan Cox [Tue, 30 Dec 2014 19:04:34 +0000 (19:04 +0000)]
tty: add ioctl numbers for vt/kbd ops

9 years agovt: add the framework for reporting the keyboard map and VT size
Alan Cox [Tue, 30 Dec 2014 19:04:17 +0000 (19:04 +0000)]
vt: add the framework for reporting the keyboard map and VT size

9 years agoexecve: fix build with CP/M emulator enabled
Alan Cox [Tue, 30 Dec 2014 19:03:27 +0000 (19:03 +0000)]
execve: fix build with CP/M emulator enabled

9 years ago6809: remove dead timer reference
Alan Cox [Tue, 30 Dec 2014 19:03:19 +0000 (19:03 +0000)]
6809: remove dead timer reference

9 years agoutils: Make mkfs hopefully work and build a Fuzix fs
Alan Cox [Tue, 30 Dec 2014 17:34:55 +0000 (17:34 +0000)]
utils: Make mkfs hopefully work and build a Fuzix fs

9 years agosysexits.h: BSD provides this and some BSDlike apps want to use it
Alan Cox [Tue, 30 Dec 2014 16:54:01 +0000 (16:54 +0000)]
sysexits.h: BSD provides this and some BSDlike apps want to use it

Import directly.

9 years agoutils; add pagesize
Alan Cox [Tue, 30 Dec 2014 16:30:57 +0000 (16:30 +0000)]
utils; add pagesize

9 years agotrs80: fix bogus static
Alan Cox [Tue, 30 Dec 2014 15:11:56 +0000 (15:11 +0000)]
trs80: fix bogus static

9 years agodosread: add the DOS tools.
Alan Cox [Tue, 30 Dec 2014 14:17:13 +0000 (14:17 +0000)]
dosread: add the DOS tools.

These need SDCC 3.4.1 snapshots to build. At 25K it's also a bit tight on space
for a box with 32K binaries, but fine on a bigger setup

9 years agoxitoa: fix internal _itoa
Alan Cox [Tue, 30 Dec 2014 14:10:21 +0000 (14:10 +0000)]
xitoa: fix internal _itoa

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Tue, 30 Dec 2014 12:05:33 +0000 (12:05 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

Merge together utils work and upstream github merges

9 years agoutils: Add who from ELKS
Alan Cox [Tue, 30 Dec 2014 11:43:12 +0000 (11:43 +0000)]
utils: Add who from ELKS

9 years agofcntl.h: pull in sys/types.h
Alan Cox [Tue, 30 Dec 2014 11:42:30 +0000 (11:42 +0000)]
fcntl.h: pull in sys/types.h

9 years agoutils: add write from ELKS
Alan Cox [Tue, 30 Dec 2014 11:39:49 +0000 (11:39 +0000)]
utils: add write from ELKS

9 years agoutils: Add xargs from ELKS
Alan Cox [Tue, 30 Dec 2014 11:39:05 +0000 (11:39 +0000)]
utils: Add xargs from ELKS

9 years agoutils: Import yes from ELKS sh-utils and ANSIfy
Alan Cox [Tue, 30 Dec 2014 11:37:22 +0000 (11:37 +0000)]
utils: Import yes from ELKS sh-utils and ANSIfy

9 years agoutils: Add stty
Alan Cox [Tue, 30 Dec 2014 11:33:47 +0000 (11:33 +0000)]
utils: Add stty

9 years agotty: correct NOFLUSH to NOFLSH
Alan Cox [Tue, 30 Dec 2014 11:33:10 +0000 (11:33 +0000)]
tty: correct NOFLUSH to NOFLSH

9 years agotermios: correct NOFLUSH to NOFLSH and add _POSIX_VDISABLE
Alan Cox [Tue, 30 Dec 2014 11:32:27 +0000 (11:32 +0000)]
termios: correct NOFLUSH to NOFLSH and add _POSIX_VDISABLE

9 years agoutils: Add logname
Alan Cox [Tue, 30 Dec 2014 11:09:59 +0000 (11:09 +0000)]
utils: Add logname

9 years agoutils: from minixspace this time
Alan Cox [Mon, 29 Dec 2014 23:33:31 +0000 (23:33 +0000)]
utils: from minixspace this time

Note: sed gives sdcc the shits. Build send with 100 not 20000 or you'll be
waiting all week

9 years agoMerge pull request #34 from geijoenr/master
EtchedPixels [Mon, 29 Dec 2014 23:13:26 +0000 (23:13 +0000)]
Merge pull request #34 from geijoenr/master

msx2: fix rom bootstrap

9 years agoMerge pull request #35 from willsowerbutts/toupstream
EtchedPixels [Mon, 29 Dec 2014 23:08:58 +0000 (23:08 +0000)]
Merge pull request #35 from willsowerbutts/toupstream

n8vem-mark4: Optimise SD SPI routines to be faster, smaller

9 years agoMerge pull request #36 from willsowerbutts/toupstream2
EtchedPixels [Mon, 29 Dec 2014 23:08:20 +0000 (23:08 +0000)]
Merge pull request #36 from willsowerbutts/toupstream2

Minor improvements to prompting for boot device number

9 years agoutils: add head
Alan Cox [Mon, 29 Dec 2014 22:51:20 +0000 (22:51 +0000)]
utils: add head

9 years agostat.h: mkfifo prototype
Alan Cox [Mon, 29 Dec 2014 22:51:01 +0000 (22:51 +0000)]
stat.h: mkfifo prototype

9 years agosyscall_fs2: set nproc in the sysinfo
Alan Cox [Mon, 29 Dec 2014 22:50:41 +0000 (22:50 +0000)]
syscall_fs2: set nproc in the sysinfo

9 years agoman: add basic man util
Alan Cox [Mon, 29 Dec 2014 22:39:22 +0000 (22:39 +0000)]
man: add basic man util

9 years agoutils: Add sum
Alan Cox [Mon, 29 Dec 2014 22:31:59 +0000 (22:31 +0000)]
utils: Add sum

9 years agogrep: replace minimal grep with a full implementation
Alan Cox [Mon, 29 Dec 2014 22:28:58 +0000 (22:28 +0000)]
grep: replace minimal grep with a full implementation

9 years agoutils: add fgrep
Alan Cox [Mon, 29 Dec 2014 22:23:24 +0000 (22:23 +0000)]
utils: add fgrep

9 years agodecomp16: decompress 16bit LZ
Alan Cox [Mon, 29 Dec 2014 22:18:37 +0000 (22:18 +0000)]
decomp16: decompress 16bit LZ

This is going to give most Z80 boxes a bit of a battering if it works at all.
Committing this more because it'll be an excellent way to test pipes and
abuse the system for stress testing.

9 years agocksum: add checksum utility
Alan Cox [Mon, 29 Dec 2014 22:13:40 +0000 (22:13 +0000)]
cksum: add checksum utility

9 years agoutils; Add banner, cmp and mkfifo
Alan Cox [Mon, 29 Dec 2014 22:10:47 +0000 (22:10 +0000)]
utils; Add banner, cmp and mkfifo

9 years agovfprintf: fix confusion about ltoa and ltostr
Alan Cox [Mon, 29 Dec 2014 21:55:51 +0000 (21:55 +0000)]
vfprintf: fix confusion about ltoa and ltostr

9 years agomsx2: fix rom bootstrap
geijoenr [Mon, 29 Dec 2014 21:52:58 +0000 (22:52 +0100)]
msx2: fix rom bootstrap

9 years agoKernel: Minor improvements to prompting for boot device number, no
Will Sowerbutts [Mon, 29 Dec 2014 21:43:11 +0000 (21:43 +0000)]
Kernel: Minor improvements to prompting for boot device number, no
longer tries to parse junk left in the command line buffer at 0x0081.

9 years agoKernel: n8vem-mark4: Optimise SD SPI routines to run faster, and drop
Will Sowerbutts [Mon, 29 Dec 2014 20:58:35 +0000 (20:58 +0000)]
Kernel: n8vem-mark4: Optimise SD SPI routines to run faster, and drop
the large precomputed table. Rename block send/receive routines with
clearer names.

9 years agoinode: Note bug in pipe handling
Alan Cox [Mon, 29 Dec 2014 16:41:59 +0000 (16:41 +0000)]
inode: Note bug in pipe handling

9 years agoselect: now we know where to hide the selmaps for free add some more code
Alan Cox [Mon, 29 Dec 2014 16:41:29 +0000 (16:41 +0000)]
select: now we know where to hide the selmaps for free add some more code

Still fleshing this out - it's not yet complete

9 years agoREADME.md: Will's SD merged, so update the README
Alan Cox [Mon, 29 Dec 2014 01:38:30 +0000 (01:38 +0000)]
README.md: Will's SD merged, so update the README

9 years agodevsdspi: mark table const
Alan Cox [Mon, 29 Dec 2014 01:36:54 +0000 (01:36 +0000)]
devsdspi: mark table const

9 years agoMerge pull request #32 from willsowerbutts/toupstream
EtchedPixels [Mon, 29 Dec 2014 01:35:02 +0000 (01:35 +0000)]
Merge pull request #32 from willsowerbutts/toupstream

Toupstream

9 years agoKernel: make clean should clean up cpm-loader subdirectory
Will Sowerbutts [Mon, 29 Dec 2014 00:50:05 +0000 (00:50 +0000)]
Kernel: make clean should clean up cpm-loader subdirectory

9 years agoKernel: Add a generic SD/MMC storage card driver, using SPI bus
Will Sowerbutts [Mon, 29 Dec 2014 00:47:58 +0000 (00:47 +0000)]
Kernel: Add a generic SD/MMC storage card driver, using SPI bus
functions provided by the platform. Also includes a driver for the SD
card SPI bus on the n8vem-mark4 platform.

9 years agoKernel: Convert devide to uint types, split out MBR partition parser.
Will Sowerbutts [Mon, 29 Dec 2014 00:39:20 +0000 (00:39 +0000)]
Kernel: Convert devide to uint types, split out MBR partition parser.

9 years agoKernel: root_dev should be uint16_t
Will Sowerbutts [Sun, 28 Dec 2014 22:10:13 +0000 (22:10 +0000)]
Kernel: root_dev should be uint16_t

9 years agolimits.h: remove extra #endif
Alan Cox [Mon, 29 Dec 2014 00:51:02 +0000 (00:51 +0000)]
limits.h: remove extra #endif

9 years agofdisk: Now we are doing PC style partition tables import an fdisk tool
Alan Cox [Sun, 28 Dec 2014 23:54:12 +0000 (23:54 +0000)]
fdisk: Now we are doing PC style partition tables import an fdisk tool

9 years agopathconf: doesnt use sysinfo so don't fetch it
Alan Cox [Sun, 28 Dec 2014 23:53:39 +0000 (23:53 +0000)]
pathconf: doesnt use sysinfo so don't fetch it

9 years agosysconf: use nproc value
Alan Cox [Sun, 28 Dec 2014 23:53:23 +0000 (23:53 +0000)]
sysconf: use nproc value

9 years agosyscalls.h: update sysinfo block
Alan Cox [Sun, 28 Dec 2014 23:53:06 +0000 (23:53 +0000)]
syscalls.h: update sysinfo block

9 years agosyscall: update makeversion to build sysinfo properly, and add num procs
Alan Cox [Sun, 28 Dec 2014 23:52:26 +0000 (23:52 +0000)]
syscall: update makeversion to build sysinfo properly, and add num procs

Also add a geometry ioctl for hd drivers (not yet wired up)

9 years agomakeversion: report Fuzix not UZI+
Alan Cox [Sun, 28 Dec 2014 23:01:58 +0000 (23:01 +0000)]
makeversion: report Fuzix not UZI+

9 years agosysconf/pathconf: Add pathconf, update sysconf
Alan Cox [Sun, 28 Dec 2014 22:43:50 +0000 (22:43 +0000)]
sysconf/pathconf: Add pathconf, update sysconf

Add load average interface
Add pathconf interfaces, first cut

9 years agoutsname: add utsname functionality
Alan Cox [Sun, 28 Dec 2014 22:28:52 +0000 (22:28 +0000)]
utsname: add utsname functionality

9 years agoutsname: tidy header
Alan Cox [Sun, 28 Dec 2014 22:28:16 +0000 (22:28 +0000)]
utsname: tidy header

9 years agoinit: Remove debug stuff
Alan Cox [Sat, 27 Dec 2014 21:45:47 +0000 (21:45 +0000)]
init: Remove debug stuff

9 years agokdata: remove dead time struct
Alan Cox [Sat, 27 Dec 2014 21:41:18 +0000 (21:41 +0000)]
kdata: remove dead time struct

9 years agoexecve: Fix a load of problems in both crt0.s and the kernel
Alan Cox [Sat, 27 Dec 2014 21:40:03 +0000 (21:40 +0000)]
execve: Fix a load of problems in both crt0.s and the kernel

The good news is this fixes a lot of things. The bad news is that all the
old binaries were broken. Oh well.. if we are going to have binary breakage
we might as well do it twice in one day.

Data, bss and break are now all set up correctly (I hope)

9 years agotimer: Move structures about
Alan Cox [Sat, 27 Dec 2014 21:38:56 +0000 (21:38 +0000)]
timer: Move structures about

All the clock bits are now in the cpu struct together. This also lets us
flip the 6809 clock/mini union the right way up for big endian

9 years agosize: Add a size tool to report binary sizes
Alan Cox [Sat, 27 Dec 2014 21:04:11 +0000 (21:04 +0000)]
size: Add a size tool to report binary sizes

9 years agoMerge pull request #31 from willsowerbutts/tickunion
EtchedPixels [Sat, 27 Dec 2014 19:56:32 +0000 (19:56 +0000)]
Merge pull request #31 from willsowerbutts/tickunion

Kernel: Merge 16-bit and 32-bit tick counters into one structure

9 years agoKernel: Merge 16-bit and 32-bit tick counters into one structure
Will Sowerbutts [Sat, 27 Dec 2014 16:32:15 +0000 (16:32 +0000)]
Kernel: Merge 16-bit and 32-bit tick counters into one structure

9 years agoMerge pull request #29 from geijoenr/master
EtchedPixels [Sat, 27 Dec 2014 16:31:15 +0000 (16:31 +0000)]
Merge pull request #29 from geijoenr/master

Add keyboard support for msx

9 years agoREADME.md: correct
Alan Cox [Sat, 27 Dec 2014 16:29:33 +0000 (16:29 +0000)]
README.md: correct

9 years agogetpass: don't suck in stdio
Alan Cox [Sat, 27 Dec 2014 15:48:46 +0000 (15:48 +0000)]
getpass: don't suck in stdio

9 years agotimer: remove more dead references
Alan Cox [Sat, 27 Dec 2014 15:39:16 +0000 (15:39 +0000)]
timer: remove more dead references

9 years agotimer: remove dead timer reference from other ports
Alan Cox [Sat, 27 Dec 2014 15:38:50 +0000 (15:38 +0000)]
timer: remove dead timer reference from other ports

9 years agoREADME.md: new ports from Will
Alan Cox [Sat, 27 Dec 2014 15:27:00 +0000 (15:27 +0000)]
README.md: new ports from Will

9 years agoMerge pull request #30 from willsowerbutts/toupstream
EtchedPixels [Sat, 27 Dec 2014 15:23:54 +0000 (15:23 +0000)]
Merge pull request #30 from willsowerbutts/toupstream

Fuzix kernel Z180 support, p112 and n8vem-mark4 platforms, other minor fixes

9 years agoinit: remove use of the malloc package
Alan Cox [Sat, 27 Dec 2014 15:12:17 +0000 (15:12 +0000)]
init: remove use of the malloc package

We can sbrk up our own environment strings and that cuts init down to about
9K. Way more than it should be, but most of what it drags in now needs
fixing in the libraries instead.

9 years agoKernel: Bug fix -- bankfixed pagemap_realloc() check was too strict
Will Sowerbutts [Sat, 27 Dec 2014 14:39:26 +0000 (14:39 +0000)]
Kernel: Bug fix -- bankfixed pagemap_realloc() check was too strict

9 years agoKernel: Useful debug routines for Z180 (commented out)
Will Sowerbutts [Sat, 27 Dec 2014 14:24:55 +0000 (14:24 +0000)]
Kernel: Useful debug routines for Z180 (commented out)

9 years agoMerge remote-tracking branch 'alan/master' into toupstream
Will Sowerbutts [Sat, 27 Dec 2014 14:39:55 +0000 (14:39 +0000)]
Merge remote-tracking branch 'alan/master' into toupstream

9 years agocrt0: set the load page to 1
Alan Cox [Sat, 27 Dec 2014 13:59:50 +0000 (13:59 +0000)]
crt0: set the load page to 1

Probably fcc binman should do the needed magic for such things

9 years agoexecve: handle null files
Alan Cox [Sat, 27 Dec 2014 13:59:03 +0000 (13:59 +0000)]
execve: handle null files

When given an empty file execve was doing a bmap and trying to load block
-1 from the disk. Catch the empty file case earlier and error it.

9 years agoAdd keyboard support for msx
geijoenr [Sat, 27 Dec 2014 13:21:05 +0000 (14:21 +0100)]
Add keyboard support for msx

9 years agoubee: check the right flag on dec b for the crtc loop.
Alan Cox [Sat, 27 Dec 2014 13:14:32 +0000 (13:14 +0000)]
ubee: check the right flag on dec b for the crtc loop.

9 years agotrs80: Check the PV flag not C on 8bit dec
Alan Cox [Sat, 27 Dec 2014 13:13:30 +0000 (13:13 +0000)]
trs80: Check the PV flag not C on 8bit dec

9 years agoexecve: Fix ABI change on unsized binaries
Alan Cox [Sat, 27 Dec 2014 12:51:41 +0000 (12:51 +0000)]
execve: Fix ABI change on unsized binaries

We need to adjust by the load page *after* we have checked for zero.

9 years agoKernel: Remove obsolete lines from kernel.def on p112 and n8vem-mark4 platforms
Will Sowerbutts [Sat, 27 Dec 2014 11:34:19 +0000 (11:34 +0000)]
Kernel: Remove obsolete lines from kernel.def on p112 and n8vem-mark4 platforms

9 years agoKernel: Bug fix -- on system call, touch kernel_flag only after switching to the...
Will Sowerbutts [Sat, 27 Dec 2014 11:26:25 +0000 (11:26 +0000)]
Kernel: Bug fix -- on system call, touch kernel_flag only after switching to the kernel memory bank

9 years agoKernel: Tidy up p112 and n8vem-mark4 targets, remove redundant code and merge memory...
Will Sowerbutts [Sat, 27 Dec 2014 11:22:22 +0000 (11:22 +0000)]
Kernel: Tidy up p112 and n8vem-mark4 targets, remove redundant code and merge memory mapping functions into common Z180 code.

9 years agoKernel: Add N8VEM Mark 4 and DX-Designs P112 platforms
Will Sowerbutts [Sat, 27 Dec 2014 02:38:45 +0000 (02:38 +0000)]
Kernel: Add N8VEM Mark 4 and DX-Designs P112 platforms