FUZIX.git
9 years agotrs80: fix swapping - bug in devhd handling of cylinder boundaries
Alan Cox [Sat, 16 May 2015 00:30:51 +0000 (01:30 +0100)]
trs80: fix swapping - bug in devhd handling of cylinder boundaries

9 years agodevio: Fix the long standing buffer flushing FIXME
Alan Cox [Fri, 15 May 2015 23:47:58 +0000 (00:47 +0100)]
devio: Fix the long standing buffer flushing FIXME

We now drop buffers on the final close of a device. This makes mounting
different floppy disks work reliably.

9 years agotrs80: swap hd and fd over
Alan Cox [Fri, 15 May 2015 23:33:52 +0000 (00:33 +0100)]
trs80: swap hd and fd over

Somewhere along the line convention appears to have ended up that the block
generics are device 0 (in effect hd and sd devices). Make trs80 follow the
pattern. Conveniently this also means hitting return boots off hd which is
nice.

9 years agotrs80: fix hard disk problems
Alan Cox [Fri, 15 May 2015 23:32:24 +0000 (00:32 +0100)]
trs80: fix hard disk problems

- Sector offset was wrong so it didn't interoperate
- User mode fetched only half the sectors so execve broke on hd
- Tools replicated hd offset bug

With these fixed you can partition and run FUZIX on the hard disk device even
if set up directly or under another OS.

Swap still blows up but this doesn't appear to be an hd bug at this point

9 years agodevio: d_flush of a flush incapable device is not an error
Alan Cox [Fri, 15 May 2015 23:31:38 +0000 (00:31 +0100)]
devio: d_flush of a flush incapable device is not an error

Fixes mount, mkdir and other odd failures

9 years agosh: lower fds used for internal processing
Alan Cox [Fri, 15 May 2015 21:39:04 +0000 (22:39 +0100)]
sh: lower fds used for internal processing

Otherwise we exceed the number allocated on many ports. This gets us to a
shell prompt but things then go downhill

9 years agosh: tidy ups for main.c
Alan Cox [Fri, 15 May 2015 21:38:30 +0000 (22:38 +0100)]
sh: tidy ups for main.c

9 years agosh: removed dup header so remove the Makefile dependancy
Alan Cox [Fri, 15 May 2015 21:38:08 +0000 (22:38 +0100)]
sh: removed dup header so remove the Makefile dependancy

9 years agosbrk: A negative sbrk is permissible, in fact /bin/sh uses it
Alan Cox [Fri, 15 May 2015 21:37:11 +0000 (22:37 +0100)]
sbrk: A negative sbrk is permissible, in fact /bin/sh uses it

9 years agotrs80: fix crash on boot when we zap the stack
Alan Cox [Fri, 15 May 2015 21:35:17 +0000 (22:35 +0100)]
trs80: fix crash on boot when we zap the stack

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Fri, 15 May 2015 00:15:18 +0000 (01:15 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMerge pull request #178 from willsowerbutts/binman
EtchedPixels [Fri, 15 May 2015 00:14:58 +0000 (01:14 +0100)]
Merge pull request #178 from willsowerbutts/binman

n8vem-mark4, p112, zeta-v2: Update to new binman packing

9 years agon8vem-mark4, p112, zeta-v2: Update to new binman packing
Will Sowerbutts [Thu, 14 May 2015 23:23:42 +0000 (00:23 +0100)]
n8vem-mark4, p112, zeta-v2: Update to new binman packing

9 years agostrsignal: correct types in signal.h
Alan Cox [Thu, 14 May 2015 22:53:30 +0000 (23:53 +0100)]
strsignal: correct types in signal.h

9 years agostrsignal: signal name conversion
Alan Cox [Thu, 14 May 2015 22:51:04 +0000 (23:51 +0100)]
strsignal: signal name conversion

9 years agonc100: turn on direct I/O and remove legacy EXEC
Alan Cox [Thu, 14 May 2015 20:26:27 +0000 (21:26 +0100)]
nc100: turn on direct I/O and remove legacy EXEC

This speeds things up a ton by removing excess copies. As our I/O subsystem is
PCMCIA SRAM the disk speed is basically CPU speed so the excess caching is not
at all helpful!

Alan

9 years agosocz80: update to new binman packing
Alan Cox [Thu, 14 May 2015 20:22:25 +0000 (21:22 +0100)]
socz80: update to new binman packing

9 years agoz80pack,plus3: update to new binman packing
Alan Cox [Thu, 14 May 2015 20:22:07 +0000 (21:22 +0100)]
z80pack,plus3: update to new binman packing

9 years agomtx, pcw8256: update to new binman
Alan Cox [Thu, 14 May 2015 20:21:40 +0000 (21:21 +0100)]
mtx, pcw8256: update to new binman

9 years agomsx: update to new binman
Alan Cox [Thu, 14 May 2015 20:21:20 +0000 (21:21 +0100)]
msx: update to new binman

9 years agobinman: Change the boot and packing (*THIS WILL AFFECT MOST PORTS*)
Alan Cox [Thu, 14 May 2015 20:13:05 +0000 (21:13 +0100)]
binman: Change the boot and packing (*THIS WILL AFFECT MOST PORTS*)

We now copy intializer to initialized and then pack common, fonts, discard etc
over data. That has two impacts

- your crt0.s needs to copy from s__DATA now
- your crt0.s ordering needs to put DATA last in the main block

It also saves us about 8K and neatly avoids any issues with overlapping memory
areas. That makes it worth the pain.

9 years agonc100: rework ram disc logic so we can get rid of legacy stuff
Alan Cox [Thu, 14 May 2015 20:12:41 +0000 (21:12 +0100)]
nc100: rework ram disc logic so we can get rid of legacy stuff

9 years agonc100: Fix packing order
Alan Cox [Thu, 14 May 2015 19:49:12 +0000 (20:49 +0100)]
nc100: Fix packing order

We need to put initializer after initialized and before data, otherwise we end
up packing 8K of zeroes. We really can't afford to be doing that!

9 years agodragon-nx32: Enable CONFIG_LARGE_IO_DIRECT and drop CONFIG_LEGACY_EXEC
Tormod Volden [Thu, 14 May 2015 09:05:17 +0000 (11:05 +0200)]
dragon-nx32: Enable CONFIG_LARGE_IO_DIRECT and drop CONFIG_LEGACY_EXEC

Now that both floppy and drivewire support raw i/o.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon-nx32: Make build instructions copy-pasteable
Tormod Volden [Thu, 14 May 2015 09:05:16 +0000 (11:05 +0200)]
dragon-nx32: Make build instructions copy-pasteable

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agosh: Missing object in Makefile.6809 clean target
Tormod Volden [Thu, 14 May 2015 09:05:15 +0000 (11:05 +0200)]
sh: Missing object in Makefile.6809 clean target

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon-nx32: initial patch for floppy support of user/kernel
Alan Cox [Wed, 13 May 2015 23:26:35 +0000 (00:26 +0100)]
dragon-nx32: initial patch for floppy support of user/kernel

9 years agodragon-nx32: Raw support on DriveWire (limited to blocks)
Tormod Volden [Tue, 12 May 2015 21:09:39 +0000 (23:09 +0200)]
dragon-nx32: Raw support on DriveWire (limited to blocks)

CONFIG_LEGACY_EXEC is still left in place until floppy
driver also gets raw support.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon ports: Proper return values from _uput* and _uget*
Tormod Volden [Tue, 12 May 2015 21:09:38 +0000 (23:09 +0200)]
dragon ports: Proper return values from _uput* and _uget*

Thanks to Brett Gordon who found that the bogus
_uget return value was causing lseek() to fail.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Tue, 12 May 2015 23:04:44 +0000 (00:04 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMerge pull request #177 from willsowerbutts/zetaboot
EtchedPixels [Tue, 12 May 2015 22:50:40 +0000 (23:50 +0100)]
Merge pull request #177 from willsowerbutts/zetaboot

zeta-v2: Fix boot from kernel in ROM

9 years agozeta-v2: Fix boot from kernel in ROM. Do not change tty1 UART parameters unless booti...
Will Sowerbutts [Sun, 10 May 2015 14:07:02 +0000 (15:07 +0100)]
zeta-v2: Fix boot from kernel in ROM. Do not change tty1 UART parameters unless booting from ROM.

9 years agosh: remove stale v7ism
Alan Cox [Mon, 11 May 2015 21:36:24 +0000 (22:36 +0100)]
sh: remove stale v7ism

9 years agosh: start trying to sort out signals
Alan Cox [Mon, 11 May 2015 21:31:35 +0000 (22:31 +0100)]
sh: start trying to sort out signals

9 years agosh: remove a FIXME
Alan Cox [Mon, 11 May 2015 21:31:21 +0000 (22:31 +0100)]
sh: remove a FIXME

9 years agosh: prt uses clock_t for time
Alan Cox [Mon, 11 May 2015 21:31:04 +0000 (22:31 +0100)]
sh: prt uses clock_t for time

9 years agoexpand: use FUZIX low level readdir functionality
Alan Cox [Mon, 11 May 2015 21:24:01 +0000 (22:24 +0100)]
expand: use FUZIX low level readdir functionality

9 years agosh: times syscall nowadays takes a struct, update accordingly
Alan Cox [Mon, 11 May 2015 21:18:43 +0000 (22:18 +0100)]
sh: times syscall nowadays takes a struct, update accordingly

9 years agotmpfile: return NULL not randomness on error
Alan Cox [Mon, 11 May 2015 20:35:34 +0000 (21:35 +0100)]
tmpfile: return NULL not randomness on error

9 years agosh: finish ansifying and fix up for other compilers
Alan Cox [Mon, 11 May 2015 20:32:26 +0000 (21:32 +0100)]
sh: finish ansifying and fix up for other compilers

There are still a fair number of FIXMEs to address and probably
it would be worth looking at later versions of sh (2.11BSD etc)
for any fixes there.

Running size (not that it's exactly runnable yet) is about 28K on
Z80 and 6809, and a bit more (33K or so) on 6502.

9 years agosh: ANSIfy main.c
Alan Cox [Sun, 10 May 2015 23:26:08 +0000 (00:26 +0100)]
sh: ANSIfy main.c

9 years agosh: service and related fixes for ANSIfication
Alan Cox [Sun, 10 May 2015 23:14:47 +0000 (00:14 +0100)]
sh: service and related fixes for ANSIfication

9 years agosh: ANSIfy printing
Alan Cox [Sun, 10 May 2015 22:50:50 +0000 (23:50 +0100)]
sh: ANSIfy printing

9 years agosh: ansify stak.c
Alan Cox [Sun, 10 May 2015 22:45:10 +0000 (23:45 +0100)]
sh: ansify stak.c

9 years agosh: ansify string.c
Alan Cox [Sun, 10 May 2015 22:41:41 +0000 (23:41 +0100)]
sh: ansify string.c

(most of this wants swapping for ANSI C string funcs later)

9 years agosh: ansify error.c
Alan Cox [Sun, 10 May 2015 22:37:16 +0000 (23:37 +0100)]
sh: ansify error.c

9 years agosh: const in ctypes
Alan Cox [Sun, 10 May 2015 22:33:15 +0000 (23:33 +0100)]
sh: const in ctypes

9 years agosh: ansify cmd.c
Alan Cox [Sun, 10 May 2015 22:32:28 +0000 (23:32 +0100)]
sh: ansify cmd.c

9 years agosh: ANSIfy builtins.c
Alan Cox [Sun, 10 May 2015 22:19:51 +0000 (23:19 +0100)]
sh: ANSIfy builtins.c

9 years agoblok: ansify
Alan Cox [Sun, 10 May 2015 21:48:09 +0000 (22:48 +0100)]
blok: ansify

9 years agosh: args, ansify
Alan Cox [Sun, 10 May 2015 21:46:41 +0000 (22:46 +0100)]
sh: args, ansify

9 years agosh: kill off INT
Alan Cox [Sun, 10 May 2015 21:43:26 +0000 (22:43 +0100)]
sh: kill off INT

9 years agosh: ident the code so it turns back into C
Alan Cox [Sun, 10 May 2015 21:38:21 +0000 (22:38 +0100)]
sh: ident the code so it turns back into C

9 years agosh: kill off more macro bits
Alan Cox [Sun, 10 May 2015 21:36:49 +0000 (22:36 +0100)]
sh: kill off more macro bits

9 years agosh: kill off REG
Alan Cox [Sun, 10 May 2015 21:33:39 +0000 (22:33 +0100)]
sh: kill off REG

9 years agosh: kill off OD/DO
Alan Cox [Sun, 10 May 2015 21:29:53 +0000 (22:29 +0100)]
sh: kill off OD/DO

9 years agosh: kill off DO
Alan Cox [Sun, 10 May 2015 21:25:39 +0000 (22:25 +0100)]
sh: kill off DO

9 years agosh: kill off PER REP
Alan Cox [Sun, 10 May 2015 21:19:57 +0000 (22:19 +0100)]
sh: kill off PER REP

9 years agosh: kill off DONE
Alan Cox [Sun, 10 May 2015 21:16:59 +0000 (22:16 +0100)]
sh: kill off DONE

9 years agosh:kill off WHILE
Alan Cox [Sun, 10 May 2015 21:15:22 +0000 (22:15 +0100)]
sh:kill off WHILE

9 years agosh: kill off FOR
Alan Cox [Sun, 10 May 2015 21:13:05 +0000 (22:13 +0100)]
sh: kill off FOR

9 years agosh: kill off IF
Alan Cox [Sun, 10 May 2015 21:11:29 +0000 (22:11 +0100)]
sh: kill off IF

9 years agosh: kill off FI
Alan Cox [Sun, 10 May 2015 21:06:53 +0000 (22:06 +0100)]
sh: kill off FI

9 years agosh: kill off THEN
Alan Cox [Sun, 10 May 2015 20:59:30 +0000 (21:59 +0100)]
sh: kill off THEN

9 years agosh: kill off ELSE
Alan Cox [Sun, 10 May 2015 20:56:43 +0000 (21:56 +0100)]
sh: kill off ELSE

9 years agosh: kill off ELIF
Alan Cox [Sun, 10 May 2015 20:53:23 +0000 (21:53 +0100)]
sh: kill off ELIF

9 years agosh: kill of SWITCH IN ENDSW
Alan Cox [Sun, 10 May 2015 20:50:34 +0000 (21:50 +0100)]
sh: kill of SWITCH IN ENDSW

9 years agosh: kill off BEGIN and END
Alan Cox [Sun, 10 May 2015 20:47:16 +0000 (21:47 +0100)]
sh: kill off BEGIN and END

9 years agosh: remove LOOP/POOL and fix some bugs introduced earlier
Alan Cox [Sun, 10 May 2015 20:44:56 +0000 (21:44 +0100)]
sh: remove LOOP/POOL and fix some bugs introduced earlier

9 years agosh: fix ANDF and ORF
Alan Cox [Sun, 10 May 2015 20:40:40 +0000 (21:40 +0100)]
sh: fix ANDF and ORF

9 years agosh: remove NEQ and some other defines
Alan Cox [Sun, 10 May 2015 20:34:00 +0000 (21:34 +0100)]
sh: remove NEQ and some other defines

9 years agosh: Remove "LOCAL" define
Alan Cox [Sun, 10 May 2015 20:32:20 +0000 (21:32 +0100)]
sh: Remove "LOCAL" define

9 years agodragon ports: Fix wrong mapping in uget()
Tormod Volden [Sun, 10 May 2015 14:24:59 +0000 (16:24 +0200)]
dragon ports: Fix wrong mapping in uget()

Thanks to Brett Gordon for finding this bug.

Fixes for instance display of command name in "ps",
and terminal settings with "stty".

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agocrt0_6809: Let linker figure out load page value
Tormod Volden [Sun, 10 May 2015 14:24:58 +0000 (16:24 +0200)]
crt0_6809: Let linker figure out load page value

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agotty: switch default binding to ^H for deletion
Alan Cox [Sun, 10 May 2015 12:31:15 +0000 (13:31 +0100)]
tty: switch default binding to ^H for deletion

This fits in with the way we map keyboards and a lot of terminals

9 years agopcw8256: keymap changes
Alan Cox [Sun, 10 May 2015 12:31:03 +0000 (13:31 +0100)]
pcw8256: keymap changes

9 years agotrs80: key mapping fixes
Alan Cox [Sun, 10 May 2015 12:30:46 +0000 (13:30 +0100)]
trs80: key mapping fixes

9 years agonc100: use more of the KEY_ defines
Alan Cox [Sun, 10 May 2015 12:30:13 +0000 (13:30 +0100)]
nc100: use more of the KEY_ defines

9 years agomtx: use KEY_ESC defines
Alan Cox [Sun, 10 May 2015 12:29:40 +0000 (13:29 +0100)]
mtx: use KEY_ESC defines

9 years agoexecve() fix for 6502
Tormod Volden [Fri, 8 May 2015 20:29:49 +0000 (22:29 +0200)]
execve() fix for 6502

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years ago/bin/sh: Minimal changes to get the real Bourne shell building
Alan Cox [Sat, 9 May 2015 23:14:15 +0000 (00:14 +0100)]
/bin/sh: Minimal changes to get the real Bourne shell building

There is a *lot* to do here to get this working (including writing setjmp
and longjmp for the 6809 port!). Getting it working on the other compilers
will need full ansification

Also note FIXME pieces for other bodges that will need dealing with before
its useful

Still it weights in at 28K so it should just about fit with some care on a
Dragon-nx-32 !

9 years agobuild-filesystem: Add build-mini-filesystem script
Alan Cox [Sat, 9 May 2015 22:02:45 +0000 (23:02 +0100)]
build-filesystem: Add build-mini-filesystem script

This builds a rootfs that will fit on a smaller disk (down to about 360K)
below that you are on your own.

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sat, 9 May 2015 17:34:50 +0000 (18:34 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agodragon: Add missing swap_map define
Tormod Volden [Fri, 8 May 2015 20:23:22 +0000 (22:23 +0200)]
dragon: Add missing swap_map define

Also define CONFIG_LEGACY_EXEC for now, and add
an Applications/util linker script for this target.

However, userspace doesn't successfully execute yet.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon ports: Fix signedness warning in devtty.c
Tormod Volden [Fri, 8 May 2015 20:23:21 +0000 (22:23 +0200)]
dragon ports: Fix signedness warning in devtty.c

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agomtx: Fix shift-uppercase and use more keysyms
Tormod Volden [Fri, 8 May 2015 20:23:20 +0000 (22:23 +0200)]
mtx: Fix shift-uppercase and use more keysyms

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon: Switch COCO_KBD to CONFIG_COCO_KBD
Alan Cox [Sat, 9 May 2015 17:12:37 +0000 (18:12 +0100)]
dragon: Switch COCO_KBD to CONFIG_COCO_KBD

One day we'll get a nice configuration system so keep real platform type
config items with CONFIG_ naming.

9 years agodragon ports: Add CoCo keyboard map
Tormod Volden [Fri, 8 May 2015 20:23:19 +0000 (22:23 +0200)]
dragon ports: Add CoCo keyboard map

One of the few differences between Dragon and CoCo 1/2.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon ports: Update keymaps to use keysyms
Tormod Volden [Fri, 8 May 2015 20:23:18 +0000 (22:23 +0200)]
dragon ports: Update keymaps to use keysyms

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agoMerge pull request #176 from willsowerbutts/zetaboot
EtchedPixels [Sat, 9 May 2015 17:07:28 +0000 (18:07 +0100)]
Merge pull request #176 from willsowerbutts/zetaboot

Make zeta-v2 boot more flexible

9 years agozeta-v2: Minor optimisation to physical memory search
Will Sowerbutts [Sat, 9 May 2015 13:23:18 +0000 (14:23 +0100)]
zeta-v2: Minor optimisation to physical memory search

9 years agozeta-v2: Bug fix for false alarms when searching for kernel in memory
Will Sowerbutts [Fri, 8 May 2015 23:31:35 +0000 (00:31 +0100)]
zeta-v2: Bug fix for false alarms when searching for kernel in memory

9 years agozeta-v2: Fix error in comment
Will Sowerbutts [Fri, 8 May 2015 23:01:06 +0000 (00:01 +0100)]
zeta-v2: Fix error in comment

9 years agozeta-v2: Update documentation. Add UNA BIOS disk boot sector.
Will Sowerbutts [Fri, 8 May 2015 22:55:42 +0000 (23:55 +0100)]
zeta-v2: Update documentation. Add UNA BIOS disk boot sector.

9 years agozeta-v2: Relocate the kernel in physical memory on boot.
Will Sowerbutts [Fri, 8 May 2015 22:33:25 +0000 (23:33 +0100)]
zeta-v2: Relocate the kernel in physical memory on boot.

This will work if the kernel is loaded in either one contiguous 64KB
block, or two discrete 32K blocks. This should cover the common ROM and
CP/M boot techniques.

9 years agozeta-v2: Build a CP/M loader for the kernel
Will Sowerbutts [Fri, 8 May 2015 22:45:14 +0000 (23:45 +0100)]
zeta-v2: Build a CP/M loader for the kernel

9 years agomtx: keymaps updated to use the keysyms
Alan Cox [Mon, 27 Apr 2015 22:39:31 +0000 (23:39 +0100)]
mtx: keymaps updated to use the keysyms

9 years agodragon-nx32: Fix ctrl and shift sending NUL bytes
Tormod Volden [Mon, 27 Apr 2015 06:58:21 +0000 (08:58 +0200)]
dragon-nx32: Fix ctrl and shift sending NUL bytes

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agoEnable ctrl + lowercase on various platforms
Tormod Volden [Mon, 27 Apr 2015 17:32:15 +0000 (19:32 +0200)]
Enable ctrl + lowercase on various platforms

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agoFix ctrl and shift sending NUL bytes on various platforms
Tormod Volden [Mon, 27 Apr 2015 17:32:14 +0000 (19:32 +0200)]
Fix ctrl and shift sending NUL bytes on various platforms

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>