FUZIX.git
5 years agodivide: do pretty stripes for I/O activity
Alan Cox [Sun, 25 Nov 2018 22:07:11 +0000 (22:07 +0000)]
divide: do pretty stripes for I/O activity

It is a spectrum after all

5 years agozxdiv: fix control (both shift) mode
Alan Cox [Sun, 25 Nov 2018 21:12:56 +0000 (21:12 +0000)]
zxdiv: fix control (both shift) mode

5 years agozxvideo: remove broken and somewhat pointless beep routine
Alan Cox [Sun, 25 Nov 2018 21:11:52 +0000 (21:11 +0000)]
zxvideo: remove broken and somewhat pointless beep routine

5 years agozxdiv: Clean up memory arrangement a bit
Alan Cox [Sun, 25 Nov 2018 20:37:20 +0000 (20:37 +0000)]
zxdiv: Clean up memory arrangement a bit

5 years agozxdiv: turn on input layer and joystick/mouse logic
Alan Cox [Sun, 25 Nov 2018 20:07:19 +0000 (20:07 +0000)]
zxdiv: turn on input layer and joystick/mouse logic

5 years agoinput: add wheel mice
Alan Cox [Sun, 25 Nov 2018 20:06:40 +0000 (20:06 +0000)]
input: add wheel mice

Yes there really are wheel capable adapters for 8bit micros

5 years agosyscall_proc: remove surplus semi-colon
Alan Cox [Sun, 25 Nov 2018 18:42:33 +0000 (18:42 +0000)]
syscall_proc: remove surplus semi-colon

5 years agozxdiv: Add graphic ioctls and fix swapmap_add misuse
Alan Cox [Sun, 25 Nov 2018 18:41:33 +0000 (18:41 +0000)]
zxdiv: Add graphic ioctls and fix swapmap_add misuse

5 years agosc108: another swapmap_add abuser
Alan Cox [Sun, 25 Nov 2018 18:41:03 +0000 (18:41 +0000)]
sc108: another swapmap_add abuser

5 years agoswap: and some more mis-users
Alan Cox [Sun, 25 Nov 2018 18:40:47 +0000 (18:40 +0000)]
swap: and some more mis-users

5 years agoswap: Fix ports using swapmap_add where swapmap_init should be used
Alan Cox [Sun, 25 Nov 2018 18:40:10 +0000 (18:40 +0000)]
swap: Fix ports using swapmap_add where swapmap_init should be used

Fixes 'free' command reporting

5 years agozxdiv: move CODE3 down now the screen has moved
Alan Cox [Sun, 25 Nov 2018 17:23:57 +0000 (17:23 +0000)]
zxdiv: move CODE3 down now the screen has moved

5 years agozxdiv: Update README
Alan Cox [Sun, 25 Nov 2018 17:23:38 +0000 (17:23 +0000)]
zxdiv: Update README

5 years agozxdiv: re-arrange video memory to 0x4000
Alan Cox [Sun, 25 Nov 2018 17:17:44 +0000 (17:17 +0000)]
zxdiv: re-arrange video memory to 0x4000

We now have the video memory mappable.

Extract the bank bits from hardcoding so we can later share code better
between related ZX ports

5 years agozx128: Move buffers to 0x6000 and dynamically reclaim space
Alan Cox [Sun, 25 Nov 2018 16:10:59 +0000 (16:10 +0000)]
zx128: Move buffers to 0x6000 and dynamically reclaim space

This gets us dynamic buffers as we want and also frees up the space between
0x4000 and 0x5FFF so that we can use the ZX Spectrum classic screen mapping
and leaves a bit of space in case we need to use any ROM hooks that want to
use system variables and BASIC hooks.

We are a bit tight between 0x2000 and 0x3FFF but have enough space for now.

Freeing up the space means we can next move the screen down. That makes the
screen potentially directly addressible from user space which is a huge win.

It also means we'll have a load of free space in CODE3 which is what we want
as well as probably room to migrate the font about a bit

5 years agozxdiv: update README
Alan Cox [Sun, 25 Nov 2018 15:33:23 +0000 (15:33 +0000)]
zxdiv: update README

5 years agocpuinfo: add a test for broken emulation
Alan Cox [Sun, 25 Nov 2018 15:33:06 +0000 (15:33 +0000)]
cpuinfo: add a test for broken emulation

5 years agozxdiv: workaround for what appears to be a bug in Fuse
Alan Cox [Sun, 25 Nov 2018 15:24:30 +0000 (15:24 +0000)]
zxdiv: workaround for what appears to be a bug in Fuse

The fuse emulator unpages the DivIDE ROM if you execute an instruction at
0x700. That appears to be wrong. The Interface 1 does this but there is no
evidence that any variant of the DivIDE does.

Anyway we can work around it easily enough - we just stuff data and constants
over that address range.

5 years agozxdiv: update the bank switching code to save the kernel bank
Alan Cox [Sun, 25 Nov 2018 15:23:48 +0000 (15:23 +0000)]
zxdiv: update the bank switching code to save the kernel bank

Otherwise we end up returning to the right address but with the wrong kernel
page mapped.

5 years agozxdiv: update README
Alan Cox [Sun, 25 Nov 2018 02:25:17 +0000 (02:25 +0000)]
zxdiv: update README

5 years agozxdiv: turn on direct I/O
Alan Cox [Sun, 25 Nov 2018 01:59:22 +0000 (01:59 +0000)]
zxdiv: turn on direct I/O

5 years agozxdiv: halt on idle
Alan Cox [Sun, 25 Nov 2018 01:59:10 +0000 (01:59 +0000)]
zxdiv: halt on idle

5 years agozxdiv: add a missing ifdef DEBUG
Alan Cox [Sun, 25 Nov 2018 01:46:37 +0000 (01:46 +0000)]
zxdiv: add a missing ifdef DEBUG

5 years agoswap: fix case where we ended up self swapping when it's forbidden
Alan Cox [Sun, 25 Nov 2018 01:41:20 +0000 (01:41 +0000)]
swap: fix case where we ended up self swapping when it's forbidden

If the only other processes you have in memory are running, and you have
gone to sleep thus triggering your swapout then we would try and swap out the
running process, which isn't supported (because we avoid the cost of a swapper
process we pay that small cost here).

5 years agodivide: fix crash on write
Alan Cox [Sun, 25 Nov 2018 00:02:41 +0000 (00:02 +0000)]
divide: fix crash on write

Missed a push af

5 years agozxdiv: set interrupt flags properly around swap
Alan Cox [Sun, 25 Nov 2018 00:02:04 +0000 (00:02 +0000)]
zxdiv: set interrupt flags properly around swap

We don't turn interrupts on for swap yet as we need to tidy up other areas
like the page duplicator

5 years agozxdiv: turn on SWAP
Alan Cox [Thu, 22 Nov 2018 14:48:51 +0000 (14:48 +0000)]
zxdiv: turn on SWAP

We now fork and blow up on the second fork trying to do swapping. Progress
of sorts

5 years agozxdiv: Fix various things
Alan Cox [Thu, 22 Nov 2018 00:19:16 +0000 (00:19 +0000)]
zxdiv: Fix various things

Map the code low
Mark code as code1 so it banks right
Fix the writable code references
Sort out the udata mapping
Fix the __memcpy calls to call our bank code not invalid sdcc lib code
Remove strlcpy we don't use
Fix minor fork bugs

With this we get to the point of init running and forking. No further but
we really need swap on to make any real progress.

5 years agoz80: Override __memcpy with our own so banked bins don't crash if it gets in
Alan Cox [Thu, 22 Nov 2018 00:18:36 +0000 (00:18 +0000)]
z80: Override __memcpy with our own so banked bins don't crash if it gets in

5 years agozxdev: second attempt at exploring a spectrum port
Alan Cox [Wed, 21 Nov 2018 00:34:10 +0000 (00:34 +0000)]
zxdev: second attempt at exploring a spectrum port

This time assume we are going to work with interfaces that can put us in the
low 16K. That is true for a lot of disk interfaces and also for many of the
Russian clones so they could run CP/M.

That gives us a much saner memory map to work from.

We get part way into boot - need to fix up the memory mappings and udata
to make further progress, then debug the DivIDE disk interface logic.

The loader works though

5 years agomsx1: typo
Alan Cox [Wed, 21 Nov 2018 00:33:57 +0000 (00:33 +0000)]
msx1: typo

5 years agobinmunge: allow relocations for function vector register loads
Alan Cox [Wed, 21 Nov 2018 00:32:21 +0000 (00:32 +0000)]
binmunge: allow relocations for function vector register loads

sdcc can generate this kind of code, so we need to generate stubs for
16bit register load fixups in code space

cp #1
jr z, 1f
ld hl,#func
jr 2f
1f: ld hl,#func2
2f:
push de
push bc
jp callhl
pop bc
pop de

5 years agospectrum: update tools for banking rule changes
Alan Cox [Wed, 21 Nov 2018 00:32:00 +0000 (00:32 +0000)]
spectrum: update tools for banking rule changes

5 years agokernel.h: define _ugetc for level 0 machines
Alan Cox [Wed, 21 Nov 2018 00:31:29 +0000 (00:31 +0000)]
kernel.h: define _ugetc for level 0 machines

5 years agoMakefile: Allow the kernel to be broken up a bit more for 16K banking
Alan Cox [Wed, 21 Nov 2018 00:31:06 +0000 (00:31 +0000)]
Makefile: Allow the kernel to be broken up a bit more for 16K banking

5 years agoissue: update for logo and 0.3rc1
Alan Cox [Sun, 18 Nov 2018 22:37:16 +0000 (22:37 +0000)]
issue: update for logo and 0.3rc1

5 years agosam: fix crash with esc-J on the bottom line
Alan Cox [Sun, 18 Nov 2018 22:07:03 +0000 (22:07 +0000)]
sam: fix crash with esc-J on the bottom line

5 years agotty: simple optimization for a very hot path
Alan Cox [Sun, 18 Nov 2018 21:56:27 +0000 (21:56 +0000)]
tty: simple optimization for a very hot path

We can do the valaddr once on Fuzix as we don't have threads or sleep races
to worry about

5 years agosam: update README
Alan Cox [Sun, 18 Nov 2018 12:24:57 +0000 (12:24 +0000)]
sam: update README

5 years agosam/thunked: Fix signal vector mishandling
Alan Cox [Sun, 18 Nov 2018 12:20:53 +0000 (12:20 +0000)]
sam/thunked: Fix signal vector mishandling

Signals are now correctly delivered in my testing. This also makes the shutdown
command work properly as a result

5 years agosam: first pass at adding the input layer and mouse interface
Alan Cox [Sun, 18 Nov 2018 00:17:32 +0000 (00:17 +0000)]
sam: first pass at adding the input layer and mouse interface

Hook up mouse and also keyboard raw event support

5 years agoinput.h: fix typo
Alan Cox [Sun, 18 Nov 2018 00:16:06 +0000 (00:16 +0000)]
input.h: fix typo

5 years agosam: initial pieces for mouse support
Alan Cox [Sat, 17 Nov 2018 22:24:17 +0000 (22:24 +0000)]
sam: initial pieces for mouse support

5 years agosam: note the two comms interface types for lpr
Alan Cox [Sat, 17 Nov 2018 17:46:13 +0000 (17:46 +0000)]
sam: note the two comms interface types for lpr

Also mask to bit 0 on the busy check

5 years agolib: initial sketches of library loader/relocator
Alan Cox [Sat, 17 Nov 2018 17:15:20 +0000 (17:15 +0000)]
lib: initial sketches of library loader/relocator

We will need this to tidy up the CP/M emulator first of all. Once the tools
are debugging it'll mean that a single emulator lib can be dynamically loaded
at the right top of memory for any use case.

5 years agosam: update README again
Alan Cox [Sat, 17 Nov 2018 16:05:46 +0000 (16:05 +0000)]
sam: update README again

5 years agosam: add graphics mode switching logic
Alan Cox [Sat, 17 Nov 2018 15:42:02 +0000 (15:42 +0000)]
sam: add graphics mode switching logic

5 years agosam: printer support
Alan Cox [Sat, 17 Nov 2018 15:41:28 +0000 (15:41 +0000)]
sam: printer support

5 years agosam: update README
Alan Cox [Sat, 17 Nov 2018 15:41:17 +0000 (15:41 +0000)]
sam: update README

5 years agographics: add support for SAM2 mode to userspace
Alan Cox [Sat, 17 Nov 2018 15:40:57 +0000 (15:40 +0000)]
graphics: add support for SAM2 mode to userspace

5 years agographics: add another weird mode
Alan Cox [Sat, 17 Nov 2018 15:39:22 +0000 (15:39 +0000)]
graphics: add another weird mode

5 years agosam: rtc support now appears to be in working order
Alan Cox [Sat, 17 Nov 2018 13:21:19 +0000 (13:21 +0000)]
sam: rtc support now appears to be in working order

5 years agosam: first cut at rtc support
Alan Cox [Sat, 17 Nov 2018 12:49:07 +0000 (12:49 +0000)]
sam: first cut at rtc support

5 years agousermem-z80-thunked: Fix crash if we uzero exactly one byte
Alan Cox [Sat, 17 Nov 2018 12:48:29 +0000 (12:48 +0000)]
usermem-z80-thunked: Fix crash if we uzero exactly one byte

5 years agosam: turn on keyboard masks, repeat and keymap reloading
Alan Cox [Sat, 17 Nov 2018 10:55:14 +0000 (10:55 +0000)]
sam: turn on keyboard masks, repeat and keymap reloading

Keyboard is not quite usable. Only known problem is the control key seems to
be broken at this point

5 years agosam, atomlite: Fix disk auto probe with ROM enabled
Alan Cox [Sat, 17 Nov 2018 10:54:33 +0000 (10:54 +0000)]
sam, atomlite: Fix disk auto probe with ROM enabled

The ROM seems to leave drive 1 selected which confused us. Go back to drive
0 before we do our magic probe tricks

5 years agosam: update README and TODO list
Alan Cox [Fri, 16 Nov 2018 22:58:53 +0000 (22:58 +0000)]
sam: update README and TODO list

5 years agosam: add a cursor
Alan Cox [Fri, 16 Nov 2018 22:50:05 +0000 (22:50 +0000)]
sam: add a cursor

5 years agoz80: update documentation for 32k/32k split
Alan Cox [Fri, 16 Nov 2018 22:49:43 +0000 (22:49 +0000)]
z80: update documentation for 32k/32k split

5 years agosc108: update to new interrupt rules and fix signal vector bug
Alan Cox [Fri, 16 Nov 2018 21:10:30 +0000 (21:10 +0000)]
sc108: update to new interrupt rules and fix signal vector bug

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)