FUZIX.git
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>
9 years agoREADME.md: update
Alan Cox [Sun, 26 Apr 2015 22:01:13 +0000 (23:01 +0100)]
README.md: update

9 years agomtx: update README
Alan Cox [Sun, 26 Apr 2015 21:56:32 +0000 (22:56 +0100)]
mtx: update README

9 years agozx128: still hunting swap bugs
Alan Cox [Sun, 26 Apr 2015 21:52:54 +0000 (22:52 +0100)]
zx128: still hunting swap bugs

9 years agonc100: Set CONFIG_LEGACY_EXEC for now
Alan Cox [Sun, 26 Apr 2015 21:51:49 +0000 (22:51 +0100)]
nc100: Set CONFIG_LEGACY_EXEC for now

The fixes in rd_memcpy need thought

9 years agomtx: fix the annoying bug that we have '<' and '>' swapped
Alan Cox [Sun, 26 Apr 2015 21:42:16 +0000 (22:42 +0100)]
mtx: fix the annoying bug that we have '<' and '>' swapped

9 years agomtx: move DISCARD so a debugging kernel fits
Alan Cox [Sun, 26 Apr 2015 21:35:09 +0000 (22:35 +0100)]
mtx: move DISCARD so a debugging kernel fits

9 years agomtx: Add floppy support for raw mode
Alan Cox [Sun, 26 Apr 2015 21:34:33 +0000 (22:34 +0100)]
mtx: Add floppy support for raw mode

We need this in order to stamp out users of CONFIG_LEGACY_RAW

9 years agomtx: add swap macros
Alan Cox [Sun, 26 Apr 2015 21:34:08 +0000 (22:34 +0100)]
mtx: add swap macros

9 years agomalloc: scrub "register"
Alan Cox [Sun, 26 Apr 2015 21:33:49 +0000 (22:33 +0100)]
malloc: scrub "register"

This still needs some cleaning and a test harness

9 years agodragon-nx32: Optimized bank copy routine for fork
Tormod Volden [Sun, 26 Apr 2015 16:50:01 +0000 (18:50 +0200)]
dragon-nx32: Optimized bank copy routine for fork

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon-nx32: Enable ctrl modifier also for lower-case
Tormod Volden [Sun, 26 Apr 2015 16:49:59 +0000 (18:49 +0200)]
dragon-nx32: Enable ctrl modifier also for lower-case

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agoMerge pull request #167 from willsowerbutts/ideopt
EtchedPixels [Fri, 24 Apr 2015 21:34:07 +0000 (22:34 +0100)]
Merge pull request #167 from willsowerbutts/ideopt

Tiny optimisation for devide_read_data()/devide_write_data()

9 years agoTiny optimisation for devide_read_data()/devide_write_data()
Will Sowerbutts [Fri, 24 Apr 2015 20:37:44 +0000 (21:37 +0100)]
Tiny optimisation for devide_read_data()/devide_write_data()

9 years agoMerge pull request #166 from willsowerbutts/ppide
EtchedPixels [Fri, 24 Apr 2015 20:19:05 +0000 (21:19 +0100)]
Merge pull request #166 from willsowerbutts/ppide

PPIDE for Zeta 2 SBC

9 years agozeta-v2: Add support for PPIDE storage
Will Sowerbutts [Fri, 24 Apr 2015 19:47:01 +0000 (20:47 +0100)]
zeta-v2: Add support for PPIDE storage

9 years agodevide: Support for IDE controllers which do not expose the IDE
Will Sowerbutts [Fri, 24 Apr 2015 19:45:25 +0000 (20:45 +0100)]
devide: Support for IDE controllers which do not expose the IDE
registers directly on the CPU bus

9 years agop112: Move device_init() to DISCARD segment
Will Sowerbutts [Fri, 24 Apr 2015 18:59:22 +0000 (19:59 +0100)]
p112: Move device_init() to DISCARD segment

9 years agozeta-v2: Move kernel down to start at address 0x0088
Will Sowerbutts [Mon, 20 Apr 2015 19:30:59 +0000 (20:30 +0100)]
zeta-v2: Move kernel down to start at address 0x0088

9 years agoKernel: Platform TTY_INIT_BAUD can override the default baud rate for
Will Sowerbutts [Fri, 17 Apr 2015 19:20:34 +0000 (20:20 +0100)]
Kernel: Platform TTY_INIT_BAUD can override the default baud rate for
all ttys (including the console)

9 years agovfprintf: use int not short for va_arg
Alan Cox [Fri, 24 Apr 2015 11:43:17 +0000 (12:43 +0100)]
vfprintf: use int not short for va_arg

This is needed on 6809, but should be correct for the general case.

9 years agolowlevel-6809.s: ashlsi3 workaround
Tormod Volden [Fri, 24 Apr 2015 11:08:48 +0000 (13:08 +0200)]
lowlevel-6809.s: ashlsi3 workaround

When calling ashlsi3 (taken from the libgcc source) the arguments
are not set up on the stack as the ashlsi3 code expects.

It might be a bug in gcc-6809, but until we get this sorted out,
use this little prologue to have the function work correctly.

This was the last hurdle to get a relatively usable system going.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agoprocess.c: Signal masks are 32 bit
Tormod Volden [Wed, 22 Apr 2015 20:47:25 +0000 (22:47 +0200)]
process.c: Signal masks are 32 bit

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agolowlevel-6809.s: Fix up signal dispatch routine
Tormod Volden [Wed, 22 Apr 2015 20:47:24 +0000 (22:47 +0200)]
lowlevel-6809.s: Fix up signal dispatch routine

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon-nx32: Add jump to null_handler at 0
Tormod Volden [Wed, 22 Apr 2015 20:47:23 +0000 (22:47 +0200)]
dragon-nx32: Add jump to null_handler at 0

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years ago6809: Require lwtools 4.11
Tormod Volden [Wed, 22 Apr 2015 20:47:22 +0000 (22:47 +0200)]
6809: Require lwtools 4.11

Earlier releases have a index d,s bug that bites us.

Also it seems to build fine on a native 64-bit build of gcc 4.6.4
with William Astle's 6809 patch (from the lwtools repo).

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agostdio: tag macros for review
Alan Cox [Tue, 21 Apr 2015 22:48:06 +0000 (23:48 +0100)]
stdio: tag macros for review

If the isfoo macros were a lose, then odds on this is as well

9 years agocrt0_6809: Initialize stdio
Tormod Volden [Tue, 21 Apr 2015 21:19:29 +0000 (23:19 +0200)]
crt0_6809: Initialize stdio

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
9 years agodragon-nx32: Add missing step in build instructions
Tormod Volden [Tue, 21 Apr 2015 21:19:28 +0000 (23:19 +0200)]
dragon-nx32: Add missing step in build instructions

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