FUZIX.git
6 years agov65c816: make bank code auto-select right number of banks
Alan Cox [Sat, 23 Sep 2017 17:57:27 +0000 (18:57 +0100)]
v65c816: make bank code auto-select right number of banks

6 years ago65c816: further updates
Alan Cox [Sat, 23 Sep 2017 17:19:44 +0000 (18:19 +0100)]
65c816: further updates

At this point it compiles although there is stuff to finish fixing up before
it's even worth trying to boot an image.

6 years ago6502: fix a bug in ugets()
Alan Cox [Sat, 23 Sep 2017 17:18:56 +0000 (18:18 +0100)]
6502: fix a bug in ugets()

Fortunately we never hit this in current uses

7 years ago65c816: Makefile
Alan Cox [Fri, 22 Sep 2017 22:38:38 +0000 (23:38 +0100)]
65c816: Makefile

7 years ago65c816: further updates
Alan Cox [Fri, 22 Sep 2017 22:37:41 +0000 (23:37 +0100)]
65c816: further updates

7 years agov658c16: intial sketches of the needed platform code
Alan Cox [Fri, 22 Sep 2017 22:36:49 +0000 (23:36 +0100)]
v658c16: intial sketches of the needed platform code

Lots to do before this even compiles

7 years ago65c816: this mornings fiddling
Alan Cox [Thu, 21 Sep 2017 21:17:50 +0000 (22:17 +0100)]
65c816: this mornings fiddling

7 years ago65c816: first sketch of needed code
Alan Cox [Wed, 20 Sep 2017 22:10:22 +0000 (23:10 +0100)]
65c816: first sketch of needed code

Lots to fill in yet but this is the basic idea

- Load kernel somewhere
- Bank 0 gets the CPU stacks
- Each process gets a bank
- Kernel gets stuffed in bank 0 if it'll fit, somewhere else if not
- C code runs with cc65 so it's using an external C stack in its own bank
  which should mean we don't have to worry about funny stack accesses (and
  can fix any in the support lib)

Processes aren't allowed to do long operations, or to save/restore bank
registers. Only awkward one here is the block move ops. We probably need
a blockmove 'syscall' that puts in th banks and avoids a process moving
bank while mvn/mvp executes (as it's interruptible).

As there is only one configuration of banking we can hopefully put all the glue
in the shared file to make platform support easier.

7 years agosmallc: remove literal buffer
Alan Cox [Wed, 20 Sep 2017 13:04:31 +0000 (14:04 +0100)]
smallc: remove literal buffer

Restructure the code so that literal data is generated inline relying upon the
assembler segment functionality to sort out the interleaving. A platform whose
assembler isn't good enough can always switch between two files...

This saves us about 3K and means that the literal space is no longer limited
to 2.5K per compiled file.

You stil can't initialize pointers but the framework is now there to do this.

7 years agooutstack: error checking
Alan Cox [Wed, 20 Sep 2017 13:01:35 +0000 (14:01 +0100)]
outstack: error checking

7 years agocode6801: use the standard routines for code/data switching
Alan Cox [Wed, 20 Sep 2017 12:59:02 +0000 (13:59 +0100)]
code6801: use the standard routines for code/data switching

This will matter big time with the literal changes

7 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Tue, 15 Aug 2017 21:31:31 +0000 (22:31 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

7 years agoMerge pull request #511 from beretta42/socket
EtchedPixels [Tue, 15 Aug 2017 21:31:24 +0000 (22:31 +0100)]
Merge pull request #511 from beretta42/socket

Various fixes/bugs for recent socket changes

7 years agotty: fix bugs in the maywait changes
Alan Cox [Tue, 15 Aug 2017 21:28:55 +0000 (22:28 +0100)]
tty: fix bugs in the maywait changes

(Courtesy of Brett and combined with my change to use uint8_t to make it work
 more nicely on Z80)

7 years agoZ80: add a flat binary to Z80 snapshot maker
Alan Cox [Tue, 15 Aug 2017 21:21:26 +0000 (22:21 +0100)]
Z80: add a flat binary to Z80 snapshot maker

Yes one day we'll need a boot loader but for emulator debug work it's so much
easier to work on snapshots

7 years agoplus3: do some initial changes
Alan Cox [Tue, 15 Aug 2017 21:20:50 +0000 (22:20 +0100)]
plus3: do some initial changes

At this point we are not yet booting. We start the image but not everything
ends up in the right place to enter the C code

7 years agonetd: fix name collisions in ntpdate
Brett Gordon [Tue, 15 Aug 2017 17:14:15 +0000 (13:14 -0400)]
netd: fix name collisions in ntpdate

7 years agonetd: fix ping symbol name collisions
Brett Gordon [Tue, 15 Aug 2017 17:10:53 +0000 (13:10 -0400)]
netd: fix ping symbol name collisions

7 years agolib: so compiler can find size_t and ssize_t
Brett Gordon [Tue, 15 Aug 2017 17:03:57 +0000 (13:03 -0400)]
lib: so compiler can find size_t and ssize_t

7 years agolib: bring liberror.c up to date with kernel
Brett Gordon [Tue, 15 Aug 2017 15:23:53 +0000 (11:23 -0400)]
lib: bring liberror.c up to date with kernel

7 years agoadd new sendto() error numbers
Brett Gordon [Tue, 15 Aug 2017 15:23:12 +0000 (11:23 -0400)]
add new sendto() error numbers

7 years agonet: easy fix to sendto()
Brett Gordon [Tue, 15 Aug 2017 13:45:50 +0000 (09:45 -0400)]
net: easy fix to sendto()

7 years agoplus3: get things back into a compiling state
Alan Cox [Sat, 12 Aug 2017 19:01:44 +0000 (20:01 +0100)]
plus3: get things back into a compiling state

7 years agoplus3: add a header for generic 8bit IDE
Alan Cox [Sat, 12 Aug 2017 18:51:11 +0000 (19:51 +0100)]
plus3: add a header for generic 8bit IDE

7 years agozx128: switch to level 0, get building ok
Alan Cox [Sat, 12 Aug 2017 18:47:20 +0000 (19:47 +0100)]
zx128: switch to level 0, get building ok

7 years agoplus3: update README ready for doing some actual work on this port
Alan Cox [Sat, 12 Aug 2017 18:47:00 +0000 (19:47 +0100)]
plus3: update README ready for doing some actual work on this port

7 years agoz80: update lowlevel-banked to account for hard_ei change
Alan Cox [Sat, 12 Aug 2017 18:46:20 +0000 (19:46 +0100)]
z80: update lowlevel-banked to account for hard_ei change

7 years agotty: revert to reporting success/fail on inproc
Alan Cox [Sat, 12 Aug 2017 18:46:02 +0000 (19:46 +0100)]
tty: revert to reporting success/fail on inproc

7 years agotty: restore inproc return
Alan Cox [Sat, 12 Aug 2017 13:43:25 +0000 (14:43 +0100)]
tty: restore inproc return

We need this for vt.c where there are multibyte input symbols so undo the
removal.

7 years agozx128: update notes
Alan Cox [Sat, 12 Aug 2017 13:32:29 +0000 (14:32 +0100)]
zx128: update notes

7 years agotty: first cut at O_NDELAY support for write()
Alan Cox [Sat, 12 Aug 2017 13:32:08 +0000 (14:32 +0100)]
tty: first cut at O_NDELAY support for write()

7 years agodevio: remove FIXME
Alan Cox [Thu, 3 Aug 2017 10:59:46 +0000 (11:59 +0100)]
devio: remove FIXME

We taught the linker to do this

7 years agotty: inproc is now void
Alan Cox [Thu, 3 Aug 2017 10:58:17 +0000 (11:58 +0100)]
tty: inproc is now void

7 years agousermem: remove old FIXME
Alan Cox [Thu, 3 Aug 2017 10:58:05 +0000 (11:58 +0100)]
usermem: remove old FIXME

7 years agoprocess: fix reparenting also handle new complications posixisms add
Alan Cox [Thu, 3 Aug 2017 10:56:56 +0000 (11:56 +0100)]
process: fix reparenting also handle new complications posixisms add

7 years agotty: deal with FIXME's from code review
Alan Cox [Thu, 3 Aug 2017 10:50:40 +0000 (11:50 +0100)]
tty: deal with FIXME's from code review

7 years agosyscall_proc: code review notes/fix
Alan Cox [Tue, 25 Jul 2017 10:44:30 +0000 (11:44 +0100)]
syscall_proc: code review notes/fix

Fix getpgrp(), note other stuff for further review

7 years agotty: note another possible tidy
Alan Cox [Tue, 25 Jul 2017 10:44:13 +0000 (11:44 +0100)]
tty: note another possible tidy

7 years agofilesys: correct error return code
Alan Cox [Tue, 25 Jul 2017 10:43:17 +0000 (11:43 +0100)]
filesys: correct error return code

7 years agomicropack: updates
Alan Cox [Sat, 8 Jul 2017 13:45:59 +0000 (14:45 +0100)]
micropack: updates

Use one less buffer via the kn_open change

This is still iffy so I may well undo the lot and abandon the idea
of a level 0 port

7 years agofilesys: we don't need to buffer the name on a tiny pure swap box
Alan Cox [Sat, 8 Jul 2017 13:45:27 +0000 (14:45 +0100)]
filesys: we don't need to buffer the name on a tiny pure swap box

7 years agoprocess.c: code review comments
Alan Cox [Sat, 8 Jul 2017 13:45:04 +0000 (14:45 +0100)]
process.c: code review comments

7 years agovt and tty: code review notes
Alan Cox [Sat, 8 Jul 2017 13:44:43 +0000 (14:44 +0100)]
vt and tty: code review notes

7 years agofilesys: code review comments
Alan Cox [Sat, 8 Jul 2017 13:43:50 +0000 (14:43 +0100)]
filesys: code review comments

7 years agolibc: add resolver
Alan Cox [Fri, 23 Jun 2017 17:09:06 +0000 (18:09 +0100)]
libc: add resolver

This isn't yet usable but it's buildable and heading in the right direction

7 years agolibc: First cut at send/sendto/recv/recvfrom
Alan Cox [Fri, 23 Jun 2017 17:07:55 +0000 (18:07 +0100)]
libc: First cut at send/sendto/recv/recvfrom

Not yet tested

7 years agoerrno.h: resync with kernel
Alan Cox [Fri, 23 Jun 2017 17:07:05 +0000 (18:07 +0100)]
errno.h: resync with kernel

Still needs the .txt file updating

7 years agosyscall_net: rework sendto()
Alan Cox [Fri, 23 Jun 2017 17:06:34 +0000 (18:06 +0100)]
syscall_net: rework sendto()

Without these changes we can't get sensible answers nor make the wrapper work

7 years agobinman: Fix a corner case
Alan Cox [Fri, 23 Jun 2017 17:06:16 +0000 (18:06 +0100)]
binman: Fix a corner case

7 years agosyscall: introduce level 0
Alan Cox [Fri, 23 Jun 2017 17:05:56 +0000 (18:05 +0100)]
syscall: introduce level 0

7 years agomicropack: more experimentation
Alan Cox [Fri, 23 Jun 2017 17:05:19 +0000 (18:05 +0100)]
micropack: more experimentation

Still not useful but we now have the notion of a 'level 0' implementation and
takes us a bit closer to the goal

7 years agomicropack: build the boot blocks
Alan Cox [Fri, 23 Jun 2017 17:04:08 +0000 (18:04 +0100)]
micropack: build the boot blocks

7 years agomicropack: turn into a level 0 test bed
Alan Cox [Wed, 14 Jun 2017 20:25:46 +0000 (21:25 +0100)]
micropack: turn into a level 0 test bed

7 years agousermem: not relevant on level 0
Alan Cox [Wed, 14 Jun 2017 20:25:37 +0000 (21:25 +0100)]
usermem: not relevant on level 0

7 years agosimple: make the two cases more obvious and avoid the need for extra defines
Alan Cox [Wed, 14 Jun 2017 20:25:04 +0000 (21:25 +0100)]
simple: make the two cases more obvious and avoid the need for extra defines

7 years agolevel0: Introduce a new level of platform
Alan Cox [Wed, 14 Jun 2017 20:23:05 +0000 (21:23 +0100)]
level0: Introduce a new level of platform

Right now we have level 1 for the basic platforms and level 2 more aimed at
16/32bit machines which adds stuff like job control and select().

Level 0 for the moment is level 1 for a simple memory mapping and no checks
on pointers being passed. It may need to drop a few obscure syscalls if they
can't nicely be made overlays.

7 years agocpu-z80: drop -Werror
Alan Cox [Wed, 14 Jun 2017 20:22:25 +0000 (21:22 +0100)]
cpu-z80: drop -Werror

It would be nice to keep this but for some small configs where the compiler
will eliminate stuff we want the behaviour it warns about. Instead policing
by hand will occur.

7 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Wed, 14 Jun 2017 00:19:19 +0000 (01:19 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

7 years agoMerge pull request #509 from retrodeluxe/master
EtchedPixels [Sun, 11 Jun 2017 14:59:28 +0000 (15:59 +0100)]
Merge pull request #509 from retrodeluxe/master

msx2: use dynamic buffers

7 years agomsx2: use dynamic buffers
geijoenr [Sat, 10 Jun 2017 15:27:21 +0000 (17:27 +0200)]
msx2: use dynamic buffers

7 years agoMerge pull request #508 from retrodeluxe/master
EtchedPixels [Fri, 9 Jun 2017 20:57:29 +0000 (21:57 +0100)]
Merge pull request #508 from retrodeluxe/master

Add multiple vt to msx2

7 years agov99xx: fix timing problem when reading from higher pages
geijoenr [Fri, 9 Jun 2017 15:21:47 +0000 (17:21 +0200)]
v99xx: fix timing problem when reading from higher pages

when reading from addresses above 0x3fff the first byte
returned by vdp is always zero. we probably should be doing
a di before setting the low byte of the address then di before
setting the low bit, but that that does not seem feasible
at the moment.

7 years agomsx2: add multiple vt support
geijoenr [Thu, 8 Jun 2017 18:43:35 +0000 (20:43 +0200)]
msx2: add multiple vt support

support for 4 vt's

7 years agomsx2: fix ordering of function keys in matrix
geijoenr [Thu, 8 Jun 2017 18:43:03 +0000 (20:43 +0200)]
msx2: fix ordering of function keys in matrix

7 years agoMerge pull request #506 from beretta42/net_native
EtchedPixels [Wed, 7 Jun 2017 13:39:16 +0000 (14:39 +0100)]
Merge pull request #506 from beretta42/net_native

net_native: a slight addition

7 years agoMerge pull request #507 from beretta42/tar
EtchedPixels [Wed, 7 Jun 2017 13:39:02 +0000 (14:39 +0100)]
Merge pull request #507 from beretta42/tar

simple fixes for 'tar'

7 years agotar: bugfix: check for error on read()
Brett Gordon [Tue, 6 Jun 2017 22:42:09 +0000 (18:42 -0400)]
tar: bugfix: check for error on read()

7 years agotar: bug fix, use TAPE env variable
Brett Gordon [Tue, 6 Jun 2017 22:40:13 +0000 (18:40 -0400)]
tar: bug fix, use TAPE env variable

7 years agonet_native: a slight addition
Brett Gordon [Tue, 6 Jun 2017 20:53:55 +0000 (16:53 -0400)]
net_native: a slight addition

7 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Mon, 5 Jun 2017 20:36:33 +0000 (21:36 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

7 years agov68-banked: add missing kernel.def
Alan Cox [Mon, 5 Jun 2017 20:36:16 +0000 (21:36 +0100)]
v68-banked: add missing kernel.def

7 years agolibc: add the new process state even though it's not visible to user
Alan Cox [Mon, 5 Jun 2017 20:35:19 +0000 (21:35 +0100)]
libc: add the new process state even though it's not visible to user

7 years agoMerge pull request #505 from retrodeluxe/master
EtchedPixels [Mon, 5 Jun 2017 19:24:55 +0000 (20:24 +0100)]
Merge pull request #505 from retrodeluxe/master

fix msx2 port

7 years agomsx2: add default keyboard repeat values
geijoenr [Mon, 5 Jun 2017 19:15:30 +0000 (21:15 +0200)]
msx2: add default keyboard repeat values

7 years agomsx2 megasd: handle page crossings
geijoenr [Tue, 30 May 2017 18:37:38 +0000 (20:37 +0200)]
msx2 megasd: handle page crossings

Due to PROGLOAD being 0x0100, last block read
in a page overflows to the next one.

7 years agomsx2: megasd falls back to slot 2-3 on probe fail
geijoenr [Tue, 30 May 2017 18:06:46 +0000 (20:06 +0200)]
msx2: megasd falls back to slot 2-3 on probe fail

this makes it easier to set-up on openmsx

7 years agomsx2: add default boot device
geijoenr [Tue, 30 May 2017 18:03:28 +0000 (20:03 +0200)]
msx2: add default boot device

7 years agomsx2: save map_table before switching pages
geijoenr [Tue, 30 May 2017 17:59:48 +0000 (19:59 +0200)]
msx2: save map_table before switching pages

If an interrupt happens between setting the mapper register
and the update of map_table, map_save will take the wrong
input for restoring the mapping when returning from the interrupt.
By saving the map_table at the beginning we ensure that no matter
when the interrupt happens, map_restore sets the right pages.

This prevents some random hangs when doing lots of usermem operations.

7 years agoexecve: stop blocking in close_on_exec
Alan Cox [Sat, 3 Jun 2017 23:02:46 +0000 (00:02 +0100)]
execve: stop blocking in close_on_exec

We don't allow closing of a dying process to block so in fact it's really
the same issue in the execve case. Dump all the ugly semaphore stuff for
a sanity check so we catch any offenders remaining after net was fixed

7 years agonet_native: close() should not block
Alan Cox [Sat, 3 Jun 2017 22:48:31 +0000 (23:48 +0100)]
net_native: close() should not block

The close process is supposed to go on asynchronously behind the back of the
closing process.

This is important because we are going to stop processes from sleeping during
an execve()

7 years agoresolv: add Ringaard resolver
Alan Cox [Sat, 3 Jun 2017 22:41:38 +0000 (23:41 +0100)]
resolv: add Ringaard resolver

We can't yet build it and it shows up some gaps in our headers too such as
the fact we need to provide a send() and recv() wrapper.

7 years agonc100: first cut at fixing breakage when a read crosses a bank boundary
Alan Cox [Sat, 3 Jun 2017 21:46:39 +0000 (22:46 +0100)]
nc100: first cut at fixing breakage when a read crosses a bank boundary

7 years agoMerge pull request #504 from beretta42/lpr
EtchedPixels [Mon, 29 May 2017 18:21:03 +0000 (19:21 +0100)]
Merge pull request #504 from beretta42/lpr

coco3: add /dev/lpr

7 years agococo3: add /dev/lpr
Brett Gordon [Mon, 29 May 2017 12:59:36 +0000 (08:59 -0400)]
coco3: add /dev/lpr

7 years agoMerge pull request #503 from beretta42/binload
EtchedPixels [Sat, 27 May 2017 13:49:46 +0000 (14:49 +0100)]
Merge pull request #503 from beretta42/binload

exec(): take PROGLOAD from the binary header

7 years agocheck for default program load address
Brett Gordon [Sat, 27 May 2017 04:19:06 +0000 (00:19 -0400)]
check for default program load address

7 years agoexec(): take PROGLOAD from the binary header
Brett Gordon [Thu, 25 May 2017 17:02:05 +0000 (13:02 -0400)]
exec(): take PROGLOAD from the binary header

7 years agoed: fix bugs and warnings
Alan Cox [Sun, 21 May 2017 21:50:28 +0000 (22:50 +0100)]
ed: fix bugs and warnings

With this fixed it seems to be stable on M68K.

7 years agov68-banked: updated README
Alan Cox [Sun, 21 May 2017 21:20:18 +0000 (22:20 +0100)]
v68-banked: updated README

Bring a bit more into line with the code status

7 years agov68-banked: fix swap handling
Alan Cox [Sun, 21 May 2017 21:18:05 +0000 (22:18 +0100)]
v68-banked: fix swap handling

This depends upon the blkdev fixes

7 years agoblkdev: allow for 16bit block counts
Alan Cox [Sun, 21 May 2017 21:16:41 +0000 (22:16 +0100)]
blkdev: allow for 16bit block counts

On a 32bit system we can end up writing more than 256 blocks in a run when
we swap so blkdev needs to use 16bits for the block counter.

(We could make this a typedef for 8 v 16bit but it's not clear it matters
 enough)

7 years agov68-banked: Get us to the point things work if we don't swap.
Alan Cox [Sun, 21 May 2017 20:35:16 +0000 (21:35 +0100)]
v68-banked: Get us to the point things work if we don't swap.

If we do swap it breaks. Not yet sure why.

7 years agov68-banked: Fix various silly things
Alan Cox [Sat, 20 May 2017 22:59:32 +0000 (23:59 +0100)]
v68-banked: Fix various silly things

This gets us to the point we hit fork. Our fork() path then fails for
reasons still under investigation.

7 years agov68: do some updating on the in progress banked memory model
Alan Cox [Sat, 20 May 2017 18:14:56 +0000 (19:14 +0100)]
v68: do some updating on the in progress banked memory model

7 years agov68: don't rewrite reset vectors or scribble off end
Alan Cox [Sat, 20 May 2017 18:14:29 +0000 (19:14 +0100)]
v68: don't rewrite reset vectors or scribble off end

7 years ago68000: introduce defines for the low byte of the page
Alan Cox [Sat, 20 May 2017 18:12:54 +0000 (19:12 +0100)]
68000: introduce defines for the low byte of the page

We need this for some of the platforms so we can do a straight mov.b
from offset(a5) to the I/O register

7 years agov68: fix old tool reference in other builds
Alan Cox [Sat, 20 May 2017 18:10:44 +0000 (19:10 +0100)]
v68: fix old tool reference in other builds

7 years agov68: more README updates
Alan Cox [Sat, 20 May 2017 16:37:23 +0000 (17:37 +0100)]
v68: more README updates

7 years agov68: update documentation on state
Alan Cox [Sat, 20 May 2017 15:58:26 +0000 (16:58 +0100)]
v68: update documentation on state

7 years ago68000: fix time_t split definition
Alan Cox [Sat, 20 May 2017 15:56:48 +0000 (16:56 +0100)]
68000: fix time_t split definition

With this corrected things like "date" now work properly on M68K