FUZIX.git
5 years agolowlevel-z80-thunked: Fix pre-emption crashes
Alan Cox [Fri, 16 Nov 2018 20:56:49 +0000 (20:56 +0000)]
lowlevel-z80-thunked: Fix pre-emption crashes

This changes the way things work between the stubs and core code as they were
broken.

The stubs are now responsible for saving all the register state on the user
stack. The istack cannot be used for this as it was before because it may be
blown away by another interrupt. Instead the stubs carefully shuffle the two
bytes of return address onto the kstack of the process and return on that stack
in the pre-emption case.

It's not pretty but it's hard to do anything more elegant, and speedwise it's
a fast way to handle it.

A 'You are not expected to understand this code' moment, but it's buried in
support assembly code that nobody else has to understand.

5 years agosam: fix vt scrolling
Alan Cox [Fri, 16 Nov 2018 20:55:44 +0000 (20:55 +0000)]
sam: fix vt scrolling

The clear line function was busted

5 years agosok: fixes for undo
Alan Cox [Fri, 16 Nov 2018 19:39:40 +0000 (19:39 +0000)]
sok: fixes for undo

5 years agops: use the right field
Alan Cox [Fri, 16 Nov 2018 19:39:30 +0000 (19:39 +0000)]
ps: use the right field

5 years agokernel: optimize the no signal chksigs() case
Alan Cox [Fri, 16 Nov 2018 19:38:27 +0000 (19:38 +0000)]
kernel: optimize the no signal chksigs() case

5 years agonet_native: remove debug
Alan Cox [Fri, 16 Nov 2018 14:46:50 +0000 (14:46 +0000)]
net_native: remove debug

5 years agorc2014: minor doc update
Alan Cox [Thu, 15 Nov 2018 21:46:48 +0000 (21:46 +0000)]
rc2014: minor doc update

5 years agoMerge pull request #671 from beretta42/mkstemps
EtchedPixels [Wed, 14 Nov 2018 15:50:01 +0000 (16:50 +0100)]
Merge pull request #671 from beretta42/mkstemps

lib: mkstemps bugs fixes

5 years agolib: mkstemps bug fixes
Brett Gordon [Sat, 3 Nov 2018 04:05:23 +0000 (00:05 -0400)]
lib: mkstemps bug fixes

5 years agofweep: Multiple binary includes and fix to build with cc65
Alan Cox [Sat, 27 Oct 2018 20:43:47 +0000 (21:43 +0100)]
fweep: Multiple binary includes and fix to build with cc65

5 years agogames: build fweep on 6502 and 6809
Alan Cox [Fri, 26 Oct 2018 11:05:35 +0000 (12:05 +0100)]
games: build fweep on 6502 and 6809

5 years agofweep: remove the old dictionary and encoder and replace them
Alan Cox [Fri, 26 Oct 2018 11:03:35 +0000 (12:03 +0100)]
fweep: remove the old dictionary and encoder and replace them

5 years agoCREDITS: add sokoban levels
Alan Cox [Fri, 26 Oct 2018 11:02:54 +0000 (12:02 +0100)]
CREDITS: add sokoban levels

5 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Thu, 25 Oct 2018 23:54:27 +0000 (00:54 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

5 years agotrs80m1: Remove README note about user space
Alan Cox [Thu, 25 Oct 2018 23:53:51 +0000 (00:53 +0100)]
trs80m1: Remove README note about user space

We have relocatable binaries, no longer a problem

5 years agoz80: build sok
Alan Cox [Thu, 25 Oct 2018 23:53:32 +0000 (00:53 +0100)]
z80: build sok

5 years agoLee J Haywood sokoban levels
Alan Cox [Thu, 25 Oct 2018 23:52:37 +0000 (00:52 +0100)]
Lee J Haywood sokoban levels

These are freely redistributable and will do as a starter. You can compile
other maps easily enough although sokmap doesn't understand all the formats
yet.

5 years agosok: A sokoban clone for Fuzix in under 16K of memory
Alan Cox [Thu, 25 Oct 2018 23:49:58 +0000 (00:49 +0100)]
sok: A sokoban clone for Fuzix in under 16K of memory

Basically works - take care your terminal width is set sensibly.

Currently the undo command is broken but restart does work

5 years agoMerge pull request #668 from dbotw/fweep
EtchedPixels [Sun, 21 Oct 2018 18:53:31 +0000 (19:53 +0100)]
Merge pull request #668 from dbotw/fweep

fweep: fix build with sdcc 3.7.1 for Travis

5 years agofweep: fix build with sdcc 3.7.1 for Travis
Jens Guenther [Sun, 21 Oct 2018 10:13:34 +0000 (12:13 +0200)]
fweep: fix build with sdcc 3.7.1 for Travis

5 years agofweep: comment parser ready to think about fixing it up
Alan Cox [Sat, 20 Oct 2018 18:22:11 +0000 (19:22 +0100)]
fweep: comment parser ready to think about fixing it up

5 years agofweep: We don't need uint64_t for older games even before we fix stuff
Alan Cox [Sat, 20 Oct 2018 18:03:55 +0000 (19:03 +0100)]
fweep: We don't need uint64_t for older games even before we fix stuff

So kill it off so that it's usable on 6502 and 6809

5 years agofweep: trim more 32bit stuff out
Alan Cox [Sat, 20 Oct 2018 17:52:18 +0000 (18:52 +0100)]
fweep: trim more 32bit stuff out

Big remaining problem sizewise is now the command parser stuff

5 years agofweep: remove more FIXME and uint32_t usage
Alan Cox [Sat, 20 Oct 2018 17:41:27 +0000 (18:41 +0100)]
fweep: remove more FIXME and uint32_t usage

5 years agofweep: make the version overridable with -D
Alan Cox [Sat, 20 Oct 2018 14:20:52 +0000 (15:20 +0100)]
fweep: make the version overridable with -D

5 years agofweep: make the framepointer a real pointer
Alan Cox [Sat, 20 Oct 2018 14:19:52 +0000 (15:19 +0100)]
fweep: make the framepointer a real pointer

Saves us a chunk of RAM

5 years agofweep; first step to tidying up framepointers
Alan Cox [Sat, 20 Oct 2018 14:03:31 +0000 (15:03 +0100)]
fweep; first step to tidying up framepointers

5 years agofweep: remove more debug
Alan Cox [Sat, 20 Oct 2018 14:02:07 +0000 (15:02 +0100)]
fweep: remove more debug

5 years agofweep: remove a bit of surplus debug
Alan Cox [Sat, 20 Oct 2018 13:54:27 +0000 (14:54 +0100)]
fweep: remove a bit of surplus debug

5 years agofweep: first pass at a working Z machine for Fuzix
Alan Cox [Fri, 19 Oct 2018 22:08:02 +0000 (23:08 +0100)]
fweep: first pass at a working Z machine for Fuzix

Still uses u64s as the original did and has ugly stuff
Lots of cleanup and space saving left to do
Auto buffer sizing needed

But it does play zork!

5 years agoAdd chmem to images
Tormod Volden [Thu, 18 Oct 2018 21:23:48 +0000 (23:23 +0200)]
Add chmem to images

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
5 years agochmem: Correct index for binary magic
Tormod Volden [Thu, 18 Oct 2018 21:23:47 +0000 (23:23 +0200)]
chmem: Correct index for binary magic

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
5 years agokernel: add a generic eject ioctl
Alan Cox [Fri, 19 Oct 2018 18:47:44 +0000 (19:47 +0100)]
kernel: add a generic eject ioctl

We'll need this later

5 years agoz80pack: "implement" the new fd API
Alan Cox [Fri, 19 Oct 2018 18:46:38 +0000 (19:46 +0100)]
z80pack: "implement" the new fd API

5 years agofdc: add a first attempt at a proper floppy API
Alan Cox [Fri, 19 Oct 2018 18:46:22 +0000 (19:46 +0100)]
fdc: add a first attempt at a proper floppy API

5 years agoppide.h: header so we can fix silly warnings in parport ide users
Alan Cox [Mon, 15 Oct 2018 18:01:06 +0000 (19:01 +0100)]
ppide.h: header so we can fix silly warnings in parport ide users

5 years agotrs80m1: more work on the FDC
Alan Cox [Sat, 13 Oct 2018 13:42:07 +0000 (14:42 +0100)]
trs80m1: more work on the FDC

This gets us closer, unfortunately I've now broken the C compiler again.

5 years agotrs80m1: first pass towards decent floppy disk support
Alan Cox [Fri, 12 Oct 2018 21:03:05 +0000 (22:03 +0100)]
trs80m1: first pass towards decent floppy disk support

5 years agops: match the kernel changes for time
Alan Cox [Wed, 10 Oct 2018 21:46:34 +0000 (22:46 +0100)]
ps: match the kernel changes for time

5 years agokernel: rework usage timers
Alan Cox [Wed, 10 Oct 2018 21:28:23 +0000 (22:28 +0100)]
kernel: rework usage timers

The old UZI code we started from defined the various time fields in both proc
and udata but used only the udata one. Perhaps an unfinished attempt to move
from proc to udata. While it saves memory keeping it in udata (20 bytes a
process or 320 bytes) we were wasting that memory anyway.

Go back to keeping it in proc as that avoids some messiness and standards
violation in the code, and makes ps work nicely. Possibly we can later move
cutime and cstime into udata but that needs review (otoh it would leave us
80 bytes up on where we started)

5 years agolibrary/tools: first cut at cc65 relocbin
Alan Cox [Wed, 10 Oct 2018 21:19:06 +0000 (22:19 +0100)]
library/tools: first cut at cc65 relocbin

5 years agorc2014: tidy up configuration
Alan Cox [Wed, 10 Oct 2018 21:18:56 +0000 (22:18 +0100)]
rc2014: tidy up configuration

5 years agochmem: merge in utils improvements
Alan Cox [Wed, 10 Oct 2018 21:18:29 +0000 (22:18 +0100)]
chmem: merge in utils improvements

5 years agoz80, banking: fix ei/di reporting for swap
Alan Cox [Wed, 10 Oct 2018 21:18:03 +0000 (22:18 +0100)]
z80, banking: fix ei/di reporting for swap

5 years agoppide: only build if configured
Alan Cox [Wed, 10 Oct 2018 21:17:40 +0000 (22:17 +0100)]
ppide: only build if configured

5 years agoutil: build new tools
Alan Cox [Wed, 10 Oct 2018 21:17:26 +0000 (22:17 +0100)]
util: build new tools

5 years agolabelfs: fix block size
Alan Cox [Wed, 10 Oct 2018 21:17:09 +0000 (22:17 +0100)]
labelfs: fix block size

5 years agochmem: remove dead comment
Alan Cox [Wed, 10 Oct 2018 21:16:55 +0000 (22:16 +0100)]
chmem: remove dead comment

5 years agovisualize: trivial mode to make it easier to read
Alan Cox [Mon, 8 Oct 2018 15:07:22 +0000 (16:07 +0100)]
visualize: trivial mode to make it easier to read

5 years agoMerge pull request #667 from beretta42/man
EtchedPixels [Mon, 8 Oct 2018 12:52:22 +0000 (13:52 +0100)]
Merge pull request #667 from beretta42/man

fsh: correct build failure

5 years agofsh: correct build failure
Brett Gordon [Mon, 8 Oct 2018 12:27:25 +0000 (08:27 -0400)]
fsh: correct build failure

5 years agonet_w5100: fix building with older sdcc
Alan Cox [Sun, 7 Oct 2018 22:13:04 +0000 (23:13 +0100)]
net_w5100: fix building with older sdcc

5 years agotravis: fix up build rule for sbcv2 not rc2014
Alan Cox [Sun, 7 Oct 2018 21:59:46 +0000 (22:59 +0100)]
travis: fix up build rule for sbcv2 not rc2014

5 years agods1302_discard: blow away the now redundant boot time clock setting
Alan Cox [Sun, 7 Oct 2018 21:58:26 +0000 (22:58 +0100)]
ds1302_discard: blow away the now redundant boot time clock setting

This is now done nicely in user space

5 years agoue: Makefile fixes
Alan Cox [Sun, 7 Oct 2018 21:48:40 +0000 (22:48 +0100)]
ue: Makefile fixes

5 years agocursesgames: Makefile fixes
Alan Cox [Sun, 7 Oct 2018 21:48:28 +0000 (22:48 +0100)]
cursesgames: Makefile fixes

5 years agosh: fix all the build messes
Alan Cox [Sun, 7 Oct 2018 21:48:15 +0000 (22:48 +0100)]
sh: fix all the build messes

5 years ago68000: fix library building
Alan Cox [Sun, 7 Oct 2018 21:47:52 +0000 (22:47 +0100)]
68000: fix library building

5 years ago65c816: tweak buffers down so it all fits
Alan Cox [Sun, 7 Oct 2018 21:46:56 +0000 (22:46 +0100)]
65c816: tweak buffers down so it all fits

5 years agoamstradnc: clock support
Alan Cox [Sun, 7 Oct 2018 21:14:35 +0000 (22:14 +0100)]
amstradnc: clock support

Also adjust the config for the NC200 as it was spilling over the boundary

5 years agotc8521: works better if you use the right I/O port
Alan Cox [Sun, 7 Oct 2018 20:57:28 +0000 (21:57 +0100)]
tc8521: works better if you use the right I/O port

5 years agotravis: build sbcv2 not rc2014 for test
Alan Cox [Sun, 7 Oct 2018 20:56:28 +0000 (21:56 +0100)]
travis: build sbcv2 not rc2014 for test

rc2014 doesn't build and fit correctly with optimization off

5 years agofsh: more Makefile hackery
Alan Cox [Sun, 7 Oct 2018 20:55:46 +0000 (21:55 +0100)]
fsh: more Makefile hackery

5 years agofsh: 6809 Makefile silly
Alan Cox [Sun, 7 Oct 2018 17:55:49 +0000 (18:55 +0100)]
fsh: 6809 Makefile silly

5 years agofsh: force the directory to exist in git
Alan Cox [Sun, 7 Oct 2018 14:04:55 +0000 (15:04 +0100)]
fsh: force the directory to exist in git

5 years ago6809: Correct Makefile for fsh
Alan Cox [Sun, 7 Oct 2018 14:02:43 +0000 (15:02 +0100)]
6809: Correct Makefile for fsh

5 years agotc8521: first cut at an RTC driver for the NC100
Alan Cox [Sun, 7 Oct 2018 12:40:07 +0000 (13:40 +0100)]
tc8521: first cut at an RTC driver for the NC100

I believe the NC200 needs an MC146818 driver writing

5 years agofsh: turn on the fsh shell for other platforms
Alan Cox [Sun, 7 Oct 2018 12:28:12 +0000 (13:28 +0100)]
fsh: turn on the fsh shell for other platforms

5 years agolibs: turn on readline for other ports
Alan Cox [Sun, 7 Oct 2018 12:24:26 +0000 (13:24 +0100)]
libs: turn on readline for other ports

5 years agoreadline: fix stupid bug in the history code
Alan Cox [Sun, 7 Oct 2018 01:00:12 +0000 (02:00 +0100)]
readline: fix stupid bug in the history code

Now seems to work properly

5 years agorc2014: update README
Alan Cox [Sat, 6 Oct 2018 23:57:45 +0000 (00:57 +0100)]
rc2014: update README

5 years agoMakefile: update obsolete ubee comment
Alan Cox [Sat, 6 Oct 2018 23:46:37 +0000 (00:46 +0100)]
Makefile: update obsolete ubee comment

5 years agosh: more work on fsh (fuzix sh - with editing)
Alan Cox [Sat, 6 Oct 2018 23:45:08 +0000 (00:45 +0100)]
sh: more work on fsh (fuzix sh - with editing)

We can't just dump /bin/sh because fsh won't fit on 32/32K systems. It sort
of works at this point but there are bugs somewhere in the readline history
logic that mess stuff up

5 years agoreadline: fix ^B stop at line start
Alan Cox [Sat, 6 Oct 2018 23:43:26 +0000 (00:43 +0100)]
readline: fix ^B stop at line start

With this fixed I think it's just the history support that's a bit buggy

5 years agofd: support map_buffers
Alan Cox [Sat, 6 Oct 2018 21:18:33 +0000 (22:18 +0100)]
fd: support map_buffers

5 years agokernel: add other needed map_buffers instances
Alan Cox [Sat, 6 Oct 2018 21:15:27 +0000 (22:15 +0100)]
kernel: add other needed map_buffers instances

As we add it to more stuff it may be more generally needed. For the moment
get the cases that matter

5 years agorc2014: turn on all the features
Alan Cox [Sat, 6 Oct 2018 21:04:22 +0000 (22:04 +0100)]
rc2014: turn on all the features

This is a bit of a tight fit but the core works with this changed.

The discard must not start below C300 to leave space for the arguments and
bootup processing.

5 years agokernel: allow for cases with only a small window in the base page
Alan Cox [Sat, 6 Oct 2018 21:01:49 +0000 (22:01 +0100)]
kernel: allow for cases with only a small window in the base page

If you have a 4x16K or similar mapping model and most of the upper page
is taken up by discard and common then there may not be 4K to randomly play with.

In that case firstly we overflow and miscalculate the pages, secondly we then
scribble on stuff we shouldn't.

Instead tighten it up so there needs to be only 512 bytes (plus vectors etc
- 256 bytes on Z80) of space.

5 years agodevide: use the new map_buffers interface
Alan Cox [Sat, 6 Oct 2018 19:31:29 +0000 (20:31 +0100)]
devide: use the new map_buffers interface

This means everyone now needs a map_buffers but as it's a no-op for most
systems and not a critical path it shouldn't be a big deal. Given how useful
external buffers are on many systems it's worth it

5 years agorc2014: turn on all the features for external buffers
Alan Cox [Sat, 6 Oct 2018 19:31:15 +0000 (20:31 +0100)]
rc2014: turn on all the features for external buffers

5 years agorc2014: add external buffer cache
Alan Cox [Sat, 6 Oct 2018 19:28:55 +0000 (20:28 +0100)]
rc2014: add external buffer cache

That lets us go up to 16K of buffers that are also unmapped when not being
accessed. Lots more meta data cached and a nicer system feel.

5 years agoinit: fix termios settings for character size
Alan Cox [Sat, 6 Oct 2018 17:07:14 +0000 (18:07 +0100)]
init: fix termios settings for character size

The termios code in init forgets to set the character width in bits so defaults
to 5 bit chars. Needless to say now we have implemented character widths in
termios settings in some drivers this does not end well.

5 years agorc2014: move to 0x0100 in order to match the new boot code
Alan Cox [Sat, 6 Oct 2018 16:45:12 +0000 (17:45 +0100)]
rc2014: move to 0x0100 in order to match the new boot code

5 years agorc2014: switch to being a bootable image not a CP/M file
Alan Cox [Sat, 6 Oct 2018 16:44:40 +0000 (17:44 +0100)]
rc2014: switch to being a bootable image not a CP/M file

5 years agorc2014: remove dead bits
Alan Cox [Sat, 6 Oct 2018 16:44:05 +0000 (17:44 +0100)]
rc2014: remove dead bits

5 years agomsx1: update README
Alan Cox [Sat, 6 Oct 2018 00:02:21 +0000 (01:02 +0100)]
msx1: update README

5 years agosh: initial readline tiny changes
Alan Cox [Sat, 6 Oct 2018 00:01:37 +0000 (01:01 +0100)]
sh: initial readline tiny changes

This is still a work in progress to get us a /bin/sh with nice modern editing
behaviour

5 years agolibs: build readline and install it for Z80 at least
Alan Cox [Sat, 6 Oct 2018 00:01:18 +0000 (01:01 +0100)]
libs: build readline and install it for Z80 at least

5 years agoClean up licensing information
Alan Cox [Fri, 5 Oct 2018 13:47:11 +0000 (14:47 +0100)]
Clean up licensing information

5 years agoreadline: fflush stdout on the GNUish one
Alan Cox [Fri, 5 Oct 2018 12:31:26 +0000 (13:31 +0100)]
readline: fflush stdout on the GNUish one

We don't use stdio but the caller might expect us to. Given any space concerned
user will call the Fuzix interfaces directly adding the stdio dep here ought to
be fine.

5 years agoreadline: updates and fixes
Alan Cox [Fri, 5 Oct 2018 12:30:16 +0000 (13:30 +0100)]
readline: updates and fixes

Now supports a timeout helper so you can use it with timed operations etc.

The fake GNU readline call is put in a seperate module so you don't have to
suck in malloc and friends just to use it.

5 years agoreadline: support Fuzix mappings for keys
Alan Cox [Fri, 5 Oct 2018 11:16:27 +0000 (12:16 +0100)]
readline: support Fuzix mappings for keys

5 years agoreadline: first cut at a readline style library
Alan Cox [Fri, 5 Oct 2018 00:36:29 +0000 (01:36 +0100)]
readline: first cut at a readline style library

Needs further work but is nice and small even with history support

5 years agoue: fix Makefile.z80 clean
Alan Cox [Thu, 4 Oct 2018 22:05:50 +0000 (23:05 +0100)]
ue: fix Makefile.z80 clean

5 years agofcc: default to relocatable + other updates
Alan Cox [Thu, 4 Oct 2018 22:04:44 +0000 (23:04 +0100)]
fcc: default to relocatable + other updates

- default to relocatable binaries
- clean up temporary files
- note some fixes to make
- fix complete hash made of files with dots in the name (eg ue.fuzix)

5 years agorelocbin: fixes and update the relocation format a bit
Alan Cox [Thu, 4 Oct 2018 22:04:27 +0000 (23:04 +0100)]
relocbin: fixes and update the relocation format a bit

5 years agocrt0,z80: Debug and slightly change the relocation setup
Alan Cox [Thu, 4 Oct 2018 22:04:01 +0000 (23:04 +0100)]
crt0,z80: Debug and slightly change the relocation setup

5 years agoMerge pull request #666 from beretta42/cocco3
EtchedPixels [Thu, 4 Oct 2018 08:59:13 +0000 (09:59 +0100)]
Merge pull request #666 from beretta42/cocco3

coco3: tty_setup, and dummy copyright

5 years agococo3: implement platform_copyright()
Brett Gordon [Wed, 3 Oct 2018 13:43:13 +0000 (09:43 -0400)]
coco3: implement platform_copyright()

5 years agovdp1: do proper interrupt blocking
Alan Cox [Wed, 3 Oct 2018 13:36:10 +0000 (14:36 +0100)]
vdp1: do proper interrupt blocking

This fixes the odd very weird happening because the TMS9918A data pointer is
messed up by register accesses (eg interrupts mid scroll). Also fix the
timing for MSX1. We can't quite otir/inir a TMS9918A on MSX but must use
outi ; jp nz in order to run at the required access rate.