FUZIX.git
9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sat, 31 Jan 2015 00:08:15 +0000 (00:08 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMerge pull request #94 from willsowerbutts/onebyte
EtchedPixels [Sat, 31 Jan 2015 00:06:17 +0000 (00:06 +0000)]
Merge pull request #94 from willsowerbutts/onebyte

n8vem-mark4: devsdspi - save a byte

9 years agon8vem-mark4: devsdspi - save a byte
Will Sowerbutts [Sat, 31 Jan 2015 00:02:05 +0000 (00:02 +0000)]
n8vem-mark4: devsdspi - save a byte

9 years agosocz80: switch to standard uarea logic for now
Alan Cox [Fri, 30 Jan 2015 23:49:28 +0000 (23:49 +0000)]
socz80: switch to standard uarea logic for now

9 years agosocz80: move to the new issue sd driver
Alan Cox [Fri, 30 Jan 2015 23:39:04 +0000 (23:39 +0000)]
socz80: move to the new issue sd driver

With this in place we mount the root file system and blow up trying to start
init.

9 years agotty: fix typo
Alan Cox [Fri, 30 Jan 2015 23:27:16 +0000 (23:27 +0000)]
tty: fix typo

9 years agosocz80: fix tty data port definition
Alan Cox [Fri, 30 Jan 2015 21:59:20 +0000 (21:59 +0000)]
socz80: fix tty data port definition

With tx interrupts off we can now get some vague impression of sanity.

9 years agosocz80: next step of fixing tty problems
Alan Cox [Fri, 30 Jan 2015 21:59:03 +0000 (21:59 +0000)]
socz80: next step of fixing tty problems

9 years agosocz80: Various fixes for the mm and interrupts
Alan Cox [Fri, 30 Jan 2015 21:07:24 +0000 (21:07 +0000)]
socz80: Various fixes for the mm and interrupts

Still definitely not there yet.

9 years agoz80: make the outfoo routines preserve everything
Alan Cox [Fri, 30 Jan 2015 17:51:55 +0000 (17:51 +0000)]
z80: make the outfoo routines preserve everything

They are mostly used for debug, so having them eat AF is just too good a way to
have them muck up the debug work.

9 years agosocz80: Bring the basic bootstrap code up to speed and use Will's .com file maker
Alan Cox [Fri, 30 Jan 2015 16:52:36 +0000 (16:52 +0000)]
socz80: Bring the basic bootstrap code up to speed and use Will's .com file maker

This gets us a fuzix.com which correctly probes the SD card, then explodes when
you hit a key at the bootdev prompt

9 years agoz80: fix all the other .lnk files
Alan Cox [Fri, 30 Jan 2015 00:42:05 +0000 (00:42 +0000)]
z80: fix all the other .lnk files

9 years agotrs80: fix link rules for file move
Alan Cox [Fri, 30 Jan 2015 00:37:58 +0000 (00:37 +0000)]
trs80: fix link rules for file move

9 years ago68000: clean up most of the 16bitisms and sign stuff
Alan Cox [Fri, 30 Jan 2015 00:30:57 +0000 (00:30 +0000)]
68000: clean up most of the 16bitisms and sign stuff

Mostly this just tidies up all the introduced types. Various things are made
explicitly unsigned that were not called out before and which gcc rightly warned
on.

The 32bit execve needs are quite different, so we split into two execve() designs
rather than make a mess of the already quite nasty 8bit one.

9 years agomalloc: We need a heap allocator for flat model systems
Alan Cox [Fri, 30 Jan 2015 00:30:19 +0000 (00:30 +0000)]
malloc: We need a heap allocator for flat model systems

This isn't intended as a general purpose kernel malloc.

9 years agoflat: initial flat memory support code
Alan Cox [Fri, 30 Jan 2015 00:27:58 +0000 (00:27 +0000)]
flat: initial flat memory support code

9 years agoprocess: fix bracketing
Alan Cox [Fri, 30 Jan 2015 00:27:31 +0000 (00:27 +0000)]
process: fix bracketing

9 years agosyscall_proc: fix 16bit ism on signals
Alan Cox [Fri, 30 Jan 2015 00:27:10 +0000 (00:27 +0000)]
syscall_proc: fix 16bit ism on signals

9 years agotty: fix warnings for types and arguments
Alan Cox [Fri, 30 Jan 2015 00:26:53 +0000 (00:26 +0000)]
tty: fix warnings for types and arguments

9 years agolink/mkdir: error link counter overrun
Alan Cox [Fri, 30 Jan 2015 00:26:24 +0000 (00:26 +0000)]
link/mkdir: error link counter overrun

9 years ago68000: base enabling pieces
Alan Cox [Fri, 30 Jan 2015 00:25:41 +0000 (00:25 +0000)]
68000: base enabling pieces

9 years agousermem: support for flat binaries
Alan Cox [Fri, 30 Jan 2015 00:24:36 +0000 (00:24 +0000)]
usermem: support for flat binaries

9 years agovt: fix argument typing ready for 32bit
Alan Cox [Fri, 30 Jan 2015 00:24:17 +0000 (00:24 +0000)]
vt: fix argument typing ready for 32bit

9 years agoswap.c: fix unused argument warning
Alan Cox [Fri, 30 Jan 2015 00:24:03 +0000 (00:24 +0000)]
swap.c: fix unused argument warning

9 years agotty/vt: fix prototypes for ioctl
Alan Cox [Fri, 30 Jan 2015 00:23:38 +0000 (00:23 +0000)]
tty/vt: fix prototypes for ioctl

9 years agodevsys: fix types
Alan Cox [Fri, 30 Jan 2015 00:23:05 +0000 (00:23 +0000)]
devsys: fix types

This doesn't matter for 16bit but will shortly

9 years agodevsys: fix warnings caused by unused parameters
Alan Cox [Fri, 30 Jan 2015 00:22:42 +0000 (00:22 +0000)]
devsys: fix warnings caused by unused parameters

9 years agodevio: fix warnings caused by unused parameters
Alan Cox [Fri, 30 Jan 2015 00:22:23 +0000 (00:22 +0000)]
devio: fix warnings caused by unused parameters

9 years ago6809: add used macro
Alan Cox [Fri, 30 Jan 2015 00:22:10 +0000 (00:22 +0000)]
6809: add used macro

9 years agocpu-z80: introduce used() macro
Alan Cox [Fri, 30 Jan 2015 00:21:38 +0000 (00:21 +0000)]
cpu-z80: introduce used() macro

SDCC wants the reverse behaviour to everyone else

9 years agocpu-6502: introduce used() macro
Alan Cox [Fri, 30 Jan 2015 00:21:13 +0000 (00:21 +0000)]
cpu-6502: introduce used() macro

So we can tidy up all the unused argument warnings

9 years ago68000: very initial pieces to work on a first 680x0 port
Alan Cox [Fri, 30 Jan 2015 00:20:34 +0000 (00:20 +0000)]
68000: very initial pieces to work on a first 680x0 port

This is at the 'gee it compiled' stage.

9 years ago6502/z80: finish fixing up signal types
Alan Cox [Tue, 27 Jan 2015 23:54:15 +0000 (23:54 +0000)]
6502/z80: finish fixing up signal types

This now passes both compilers. 6809 still needs re-aligning

9 years ago6502: correct typecasts for the break limit
Alan Cox [Tue, 27 Jan 2015 23:47:45 +0000 (23:47 +0000)]
6502: correct typecasts for the break limit

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Tue, 27 Jan 2015 23:44:38 +0000 (23:44 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMerge pull request #91 from geijoenr/master
EtchedPixels [Tue, 27 Jan 2015 23:27:24 +0000 (23:27 +0000)]
Merge pull request #91 from geijoenr/master

update megasd driver for rawflag and some small fixes including sdcc 3.4.2 fixes

9 years agomsx2: update megasd transfer functions for rawflag=1
geijoenr [Tue, 27 Jan 2015 21:41:36 +0000 (21:41 +0000)]
msx2: update megasd transfer functions for rawflag=1

9 years agomsx2: fix memory sizing
geijoenr [Tue, 27 Jan 2015 18:41:59 +0000 (18:41 +0000)]
msx2: fix memory sizing

no need to write a byte on every page, specially
after we have already copied the kernel on it.

9 years agosdcc: fix some type warnings for sdcc 3.4.2
geijoenr [Mon, 19 Jan 2015 15:04:30 +0000 (15:04 +0000)]
sdcc: fix some type warnings for sdcc 3.4.2

9 years agotypes: set the type definitions ready for non 8bit 16bit addressed
Alan Cox [Mon, 26 Jan 2015 22:54:35 +0000 (22:54 +0000)]
types: set the type definitions ready for non 8bit 16bit addressed

9 years agocpu: add uarg_t
Alan Cox [Mon, 26 Jan 2015 22:53:32 +0000 (22:53 +0000)]
cpu: add uarg_t

9 years agobank code; Add comments and information to these
Alan Cox [Mon, 26 Jan 2015 22:53:07 +0000 (22:53 +0000)]
bank code; Add comments and information to these

9 years agoMerge pull request #89 from willsowerbutts/fixdd
EtchedPixels [Mon, 26 Jan 2015 22:12:37 +0000 (22:12 +0000)]
Merge pull request #89 from willsowerbutts/fixdd

Fix for unmounting filesystem, fix for dd count= option, change bf_free to tristate for unfreeable superblocks

9 years agoKernel: Change bf_free to tristate -- free, busy, superblock.
Will Sowerbutts [Mon, 26 Jan 2015 21:31:23 +0000 (21:31 +0000)]
Kernel: Change bf_free to tristate -- free, busy, superblock.

Superblocks are never freed by bfree(). This allows the superblock to be
read by user space from the raw block device without being freed until
the filesystem is later unmounted.

9 years agoKernel: Bug fix - do not zero the superblock magic number on unmount.
Will Sowerbutts [Mon, 26 Jan 2015 21:30:52 +0000 (21:30 +0000)]
Kernel: Bug fix - do not zero the superblock magic number on unmount.

9 years agoFix count= option to dd
Will Sowerbutts [Sun, 25 Jan 2015 22:53:20 +0000 (22:53 +0000)]
Fix count= option to dd

9 years agocpu-z80/cpu.h: add a warning about __COMMONMEM
Alan Cox [Sun, 25 Jan 2015 23:19:58 +0000 (23:19 +0000)]
cpu-z80/cpu.h: add a warning about __COMMONMEM

Its an exciting new way to blow yourself up...

9 years agoMerge pull request #87 from willsowerbutts/blkdirect
EtchedPixels [Sun, 25 Jan 2015 23:18:43 +0000 (23:18 +0000)]
Merge pull request #87 from willsowerbutts/blkdirect

blkdev and friends: Update to support rawflag=1

9 years agodevsd: Remove unused memory, fix return without releasing CS
Will Sowerbutts [Sun, 25 Jan 2015 22:16:07 +0000 (22:16 +0000)]
devsd: Remove unused memory, fix return without releasing CS

9 years agombr: Reset blk_op.nblock on each transfer
Will Sowerbutts [Sun, 25 Jan 2015 22:10:18 +0000 (22:10 +0000)]
mbr: Reset blk_op.nblock on each transfer

9 years agon8vem-mark4: Update SD transfer functions for rawflag=1
Will Sowerbutts [Sun, 25 Jan 2015 22:01:43 +0000 (22:01 +0000)]
n8vem-mark4: Update SD transfer functions for rawflag=1

9 years agodevsd: Convert to new blkdev API and support rawflag=1
Will Sowerbutts [Sun, 25 Jan 2015 22:00:34 +0000 (22:00 +0000)]
devsd: Convert to new blkdev API and support rawflag=1

9 years agodevide: Convert to new blkdev API and support rawflag=1
Will Sowerbutts [Sun, 25 Jan 2015 21:57:32 +0000 (21:57 +0000)]
devide: Convert to new blkdev API and support rawflag=1

9 years agoblkdev: Support rawflag=1, pass parameters using global variables rather
Will Sowerbutts [Sun, 25 Jan 2015 21:55:30 +0000 (21:55 +0000)]
blkdev: Support rawflag=1, pass parameters using global variables rather
than function call parameters.

9 years agomonitor-z80: Print newline before banner
Will Sowerbutts [Sun, 25 Jan 2015 21:54:10 +0000 (21:54 +0000)]
monitor-z80: Print newline before banner

9 years agoNew COMMON_MEMORY macro to put code into COMMONMEM segment
Will Sowerbutts [Sun, 25 Jan 2015 21:52:34 +0000 (21:52 +0000)]
New COMMON_MEMORY macro to put code into COMMONMEM segment

9 years agoKernel: syscall_exec: Convert block number to off_t before shifting,
Will Sowerbutts [Sun, 25 Jan 2015 20:16:49 +0000 (20:16 +0000)]
Kernel: syscall_exec: Convert block number to off_t before shifting,
otherwise we're restricted to accessing only the first 64KB of the disk.

9 years agobinmunge: add option so we can stub every relocation rather than use RST
Alan Cox [Sun, 25 Jan 2015 20:46:15 +0000 (20:46 +0000)]
binmunge: add option so we can stub every relocation rather than use RST

We need this for machines where some inconsiderate designer left ROM at address
zero.

9 years agozx128: fix silly bug with !IDE
Alan Cox [Sun, 25 Jan 2015 20:43:56 +0000 (20:43 +0000)]
zx128: fix silly bug with !IDE

9 years agosyscall_exec: unsigned type for the basepage check
Alan Cox [Sun, 25 Jan 2015 20:43:23 +0000 (20:43 +0000)]
syscall_exec: unsigned type for the basepage check

Otherwise we break on 0x8000 +

9 years agozx128: first pass minor fixes
Alan Cox [Sun, 25 Jan 2015 20:42:43 +0000 (20:42 +0000)]
zx128: first pass minor fixes

Still need to sort the IDE out, and more importantly get the banked linker working

9 years agozx128: fix devtty header
Alan Cox [Sun, 25 Jan 2015 20:28:10 +0000 (20:28 +0000)]
zx128: fix devtty header

Lots more needed to start getting this port on the road usefully

9 years agomsx2: fix reference to unused symbol as the linker now cares
Alan Cox [Sun, 25 Jan 2015 19:56:06 +0000 (19:56 +0000)]
msx2: fix reference to unused symbol as the linker now cares

9 years agopcw8256: remove unused symbol from tricks.s
Alan Cox [Sun, 25 Jan 2015 19:47:09 +0000 (19:47 +0000)]
pcw8256: remove unused symbol from tricks.s

9 years agoz80pack: add raw I/O offset check
Alan Cox [Sun, 25 Jan 2015 17:52:25 +0000 (17:52 +0000)]
z80pack: add raw I/O offset check

9 years agonc100: fix silly error in raw check
Alan Cox [Sun, 25 Jan 2015 17:51:57 +0000 (17:51 +0000)]
nc100: fix silly error in raw check

9 years agonc100: fix devtty.h breakage from vt improvements
Alan Cox [Sun, 25 Jan 2015 17:48:01 +0000 (17:48 +0000)]
nc100: fix devtty.h breakage from vt improvements

9 years agotricks.s: remove reference to unused symbol - new linker cares
Alan Cox [Sun, 25 Jan 2015 17:47:01 +0000 (17:47 +0000)]
tricks.s: remove reference to unused symbol - new linker cares

9 years agonc100: fix tty table bug
Alan Cox [Sun, 25 Jan 2015 17:46:51 +0000 (17:46 +0000)]
nc100: fix tty table bug

9 years agodevlpr: update comment - 1uS required for strobe
Alan Cox [Sun, 25 Jan 2015 17:46:27 +0000 (17:46 +0000)]
devlpr: update comment - 1uS required for strobe

9 years agonc100,devrd: check lengths are valid, update comment
Alan Cox [Sun, 25 Jan 2015 17:46:10 +0000 (17:46 +0000)]
nc100,devrd: check lengths are valid, update comment

9 years agosyscall_exec: further work - mostly to persuade sdcc to generate passable code
Alan Cox [Sun, 25 Jan 2015 17:38:06 +0000 (17:38 +0000)]
syscall_exec: further work - mostly to persuade sdcc to generate passable code

9 years agotrs80: update to support direct to user space I/O
Alan Cox [Sun, 25 Jan 2015 17:37:36 +0000 (17:37 +0000)]
trs80: update to support direct to user space I/O

9 years agokernel.h: inode lengths are unsigned, tell the compiler this
Alan Cox [Sun, 25 Jan 2015 17:37:03 +0000 (17:37 +0000)]
kernel.h: inode lengths are unsigned, tell the compiler this

9 years agotgl6502: fix old comment
Alan Cox [Sun, 25 Jan 2015 17:36:51 +0000 (17:36 +0000)]
tgl6502: fix old comment

9 years agosyscall_exec: start cleaning up
Alan Cox [Sun, 25 Jan 2015 16:09:04 +0000 (16:09 +0000)]
syscall_exec: start cleaning up

Throw out the magic CP/M support - this can be better done by attaching helper code
to the CP/M binary that does an alloca and loads the emulator into the space then
runs it to move the first bytes back right, set up CP/M and go.

9 years agolowlevel-z80: fix asm error: missing #
Alan Cox [Sun, 25 Jan 2015 16:08:01 +0000 (16:08 +0000)]
lowlevel-z80: fix asm error: missing #

9 years agofixedbank: don't import unused and undefined symbols
Alan Cox [Sun, 25 Jan 2015 16:07:10 +0000 (16:07 +0000)]
fixedbank: don't import unused and undefined symbols

The newer linker errors this

9 years agoz80/6502: final (hopefully) alternate magic bytes for relocatables
Alan Cox [Sun, 25 Jan 2015 15:57:44 +0000 (15:57 +0000)]
z80/6502: final (hopefully) alternate magic bytes for relocatables

9 years agoz80: define PROGLOAD in the asm side of things, also tidy PROG_BASE to match C PROGBASE
Alan Cox [Sun, 25 Jan 2015 15:54:08 +0000 (15:54 +0000)]
z80: define PROGLOAD in the asm side of things, also tidy PROG_BASE to match C PROGBASE

This gives us the foundation to do relocation handling by passing the start of user
code its address in IY

9 years agoSIG_DFL: note must be zero, ready for execve tidy
Alan Cox [Sun, 25 Jan 2015 15:46:56 +0000 (15:46 +0000)]
SIG_DFL: note must be zero, ready for execve tidy

9 years agotgl6502: set up ready to allow relocatable binaries.
Alan Cox [Sun, 25 Jan 2015 15:45:38 +0000 (15:45 +0000)]
tgl6502: set up ready to allow relocatable binaries.

9 years agoexecve: use direct user mappings
Alan Cox [Sun, 25 Jan 2015 00:24:06 +0000 (00:24 +0000)]
execve: use direct user mappings

If your disk devices don't support this then you'll need to enable the
CONFIG_LEGACY_EXEC option and fix the target. (This probably will get renamed
because if we get to stuff like 68000 it may be we have a cache big enough to
make execve via it useful)

This makes execve much faster, way faster on slow memory devices. The remaining
performance killer is the lack of vfork.

9 years agotgl6502: enable raw I/O on the rom driver
Alan Cox [Sun, 25 Jan 2015 00:23:50 +0000 (00:23 +0000)]
tgl6502: enable raw I/O on the rom driver

9 years agobank16k_low: remove debug
Alan Cox [Sun, 25 Jan 2015 00:05:09 +0000 (00:05 +0000)]
bank16k_low: remove debug

9 years agosocz80: definitely a "don't spin" platform
Alan Cox [Sat, 24 Jan 2015 23:40:34 +0000 (23:40 +0000)]
socz80: definitely a "don't spin" platform

9 years agotty: allow -1 return from waitready to indicate the driver knows sleeping is good
Alan Cox [Sat, 24 Jan 2015 23:39:03 +0000 (23:39 +0000)]
tty: allow -1 return from waitready to indicate the driver knows sleeping is good

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sat, 24 Jan 2015 23:34:26 +0000 (23:34 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMerge pull request #84 from willsowerbutts/fixdf
EtchedPixels [Sat, 24 Jan 2015 23:34:15 +0000 (23:34 +0000)]
Merge pull request #84 from willsowerbutts/fixdf

Fix strerror, df

9 years agombr: Fix stray > at end of output with four primary partitions, no extended partitions
Will Sowerbutts [Sat, 24 Jan 2015 23:13:10 +0000 (23:13 +0000)]
mbr: Fix stray > at end of output with four primary partitions, no extended partitions

9 years agofilesystem: Add /usr/lib/liberror.txt expected by strerror()
Will Sowerbutts [Sat, 24 Jan 2015 23:03:08 +0000 (23:03 +0000)]
filesystem: Add /usr/lib/liberror.txt expected by strerror()

9 years agoApplications: Make df work
Will Sowerbutts [Sat, 24 Jan 2015 23:04:30 +0000 (23:04 +0000)]
Applications: Make df work

9 years agobank16k_low: Introduce 16K low common banking logic and use it
Alan Cox [Sat, 24 Jan 2015 21:23:18 +0000 (21:23 +0000)]
bank16k_low: Introduce 16K low common banking logic and use it

We need a different algorithm because we must keep the low page safe not the high
one. The standard bank16k grows by inserting pages before the existing repeating
top map so that common is preserved in high space. The 6502 has common in low
space so we must instead preserve the first page mapping.

9 years agoexec: introduce MAPBASE as distinguished from PROGBASE
Alan Cox [Sat, 24 Jan 2015 21:22:19 +0000 (21:22 +0000)]
exec: introduce MAPBASE as distinguished from PROGBASE

PROGBASE is where the code starts
MAPBASE is where the memory mapping begins

This is needed for systems with a low mapped common

9 years agochmem: allow for 6502 and Z80
Alan Cox [Sat, 24 Jan 2015 21:21:42 +0000 (21:21 +0000)]
chmem: allow for 6502 and Z80

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sat, 24 Jan 2015 16:03:33 +0000 (16:03 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agotgl6502: kill stray space
Alan Cox [Sat, 24 Jan 2015 16:03:05 +0000 (16:03 +0000)]
tgl6502: kill stray space

9 years agotgl6502: switch to 16K banking
Alan Cox [Sat, 24 Jan 2015 16:01:44 +0000 (16:01 +0000)]
tgl6502: switch to 16K banking

No swapping yet (and swap for 16K bank needs some core tweaks). Tested with shell
and login paths but not heavily.

9 years agodevlpr: use need_resched
Alan Cox [Sat, 24 Jan 2015 16:01:26 +0000 (16:01 +0000)]
devlpr: use need_resched

9 years agoMerge pull request #82 from willsowerbutts/rootfs
EtchedPixels [Sat, 24 Jan 2015 13:18:27 +0000 (13:18 +0000)]
Merge pull request #82 from willsowerbutts/rootfs

Add missing /tmp to root filesystem. /etc/mtab removed by init.