Alan Cox [Thu, 19 Oct 2017 19:44:42 +0000 (20:44 +0100)]
ibmpc: load at logical 0
Alan Cox [Thu, 19 Oct 2017 19:44:20 +0000 (20:44 +0100)]
mtx: Fix speed setting
Alan Cox [Thu, 19 Oct 2017 19:43:48 +0000 (20:43 +0100)]
ibmpc: update README based upon work so far
Alan Cox [Sun, 15 Oct 2017 21:13:50 +0000 (22:13 +0100)]
ibmpc: further 8086 sketching out
Alan Cox [Sun, 15 Oct 2017 18:02:57 +0000 (19:02 +0100)]
TODO: update
Alan Cox [Sun, 15 Oct 2017 18:02:20 +0000 (19:02 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sun, 15 Oct 2017 18:01:29 +0000 (19:01 +0100)]
SmallC: add missing call
Confused how it didn't get pushed originally
EtchedPixels [Sun, 15 Oct 2017 17:55:47 +0000 (18:55 +0100)]
Merge pull request #522 from beretta42/make
Odds and Ends Makefile
EtchedPixels [Sun, 15 Oct 2017 17:55:11 +0000 (18:55 +0100)]
Merge pull request #521 from beretta42/sdc
coco3: fix blkdev mapper routines: blk_op is not in common.
Alan Cox [Sun, 15 Oct 2017 17:47:59 +0000 (18:47 +0100)]
ibmpc: introduce a platform skeleton so we can test build 8086 core code
This is *miles* from being an actual port. It's just there to get the core
code comping.
Alan Cox [Sun, 15 Oct 2017 17:26:41 +0000 (18:26 +0100)]
8086: move the prototype low level code over to gcc
Alan Cox [Sun, 15 Oct 2017 17:25:28 +0000 (18:25 +0100)]
cpu-8086: move the prototype code to gcc ia16
Alan Cox [Sun, 15 Oct 2017 17:25:08 +0000 (18:25 +0100)]
z80pack: correct disk error reporting
Brett Gordon [Sun, 15 Oct 2017 00:12:46 +0000 (20:12 -0400)]
lib: only install fcc libs if using sdcc
Brett Gordon [Sat, 14 Oct 2017 23:55:10 +0000 (19:55 -0400)]
smallc: add image install script
Brett Gordon [Sat, 14 Oct 2017 23:52:29 +0000 (19:52 -0400)]
fview: fix never run-on comment
Brett Gordon [Sat, 14 Oct 2017 23:51:29 +0000 (19:51 -0400)]
apps: make: add as09, rename v7games (duplicate), phony to force build
Brett Gordon [Sat, 14 Oct 2017 23:47:13 +0000 (19:47 -0400)]
smallc: link CRT0 to build binary correctly.
Brett Gordon [Sat, 14 Oct 2017 23:44:17 +0000 (19:44 -0400)]
libs: 6809 makefile needs empty 'install' target
Brett Gordon [Sat, 14 Oct 2017 22:38:31 +0000 (18:38 -0400)]
app: as09/ld09: rename makefile
Brett Gordon [Sat, 14 Oct 2017 15:34:31 +0000 (11:34 -0400)]
coco3: fix blkdev mapper routines: blk_op is not in common.
Alan Cox [Fri, 13 Oct 2017 19:32:52 +0000 (20:32 +0100)]
z80pack: with some versions of SDCC we extend into 0xEx00
So move discard up a bit to make space for it
Alan Cox [Fri, 13 Oct 2017 19:32:14 +0000 (20:32 +0100)]
bank16k: () to (void) for neatness and consistency
Alan Cox [Fri, 13 Oct 2017 19:30:22 +0000 (20:30 +0100)]
test: fix compilation with newer SDCC
void * and function types don't mix in strict interpretations of C (think about
split I/D for one)
Patch from Philipp Klaus Krause.
Alan Cox [Fri, 13 Oct 2017 19:14:20 +0000 (20:14 +0100)]
Makefile: Clean up OBJSNS items in V7/cmd
Alan Cox [Fri, 13 Oct 2017 19:12:47 +0000 (20:12 +0100)]
Makefile: clean up cpm-loader
Alan Cox [Thu, 12 Oct 2017 22:24:25 +0000 (23:24 +0100)]
bank8086: draft code for 8086 bank handling
After much head scratching about how to implement the interleaving of
memory and real brk() and stack grow that early PC Unixes except Minix did,
I think I finally have something workable....
Alan Cox [Thu, 5 Oct 2017 23:07:51 +0000 (00:07 +0100)]
sgetl: sometimes C typing is perverse
Alan Cox [Thu, 5 Oct 2017 23:07:20 +0000 (00:07 +0100)]
6502: Make crt0 put the right address in the header not a hardcode
Alan Cox [Thu, 5 Oct 2017 23:06:06 +0000 (00:06 +0100)]
kernel: fix signal race
Without this we can have the following occur
kill(pid, foo)
queues signal processing for foo
signal(SIGFOO, SIG_IGN)
executes pending signal and jumps to lala land
Alan Cox [Tue, 3 Oct 2017 22:30:33 +0000 (23:30 +0100)]
6502: Fix ZP = 0 assumptions and note further fixes needed
The runtime for cc65 assumes it can save to ZP and jump to the same address
via a 16bit index. That fails on our 65C816 build and also on things like the
HuC. Also fix the same offence in ct0.s
Note that we need to save jmpvec+1/2 for re-entry (CC65 forgets to mention this)
and also that we can't just swap zp because unlike a kernel/IRQ switch where
this is valid in Fuzix it's possible to take one signal in another, thus
we must stack the ZP state somewhere (at 20 odd bytes probably the C stack)
Alan Cox [Tue, 3 Oct 2017 21:01:59 +0000 (22:01 +0100)]
Makefile: Use $(MAKE) and support -j
sdcc is slow as molasses but if you've got 16 cores you might as well use them
all 8)
Alan Cox [Tue, 3 Oct 2017 16:22:08 +0000 (17:22 +0100)]
includes: unbreak search.h properly
Alan Cox [Tue, 3 Oct 2017 15:48:57 +0000 (16:48 +0100)]
cpm-emulator: Remove only the dead bits this time
Alan Cox [Tue, 3 Oct 2017 15:47:56 +0000 (16:47 +0100)]
Revert "kernel: remove obsolete CP/M bits"
Oops.. deleted cpm-loader as well in error
This reverts commit
876590b88adcf31cebcdc8c2bec3f3d1f0612dd8.
Alan Cox [Sun, 1 Oct 2017 23:48:17 +0000 (00:48 +0100)]
65c816: assorted low level fixes
With these fixed we get to a shell prompt and can run some commands. To get
further is going to need cc65 modifications as cc65 generates the following
code in /bin/ls
STA $08 3
STX $09 3
JMP $0008 5
which of course goes castors up on the 65C816 set up because DP is not B:0000
nor can it be.
So far this seems to be the only problem case and it looks as if generating a
PHX 3
PHA 3
RTS 6
would be within one clock for 65C02 or later. 6502 compatible code
will need an uglier fixup I fear.
STA $08 3
TXA 2
PHA 3
LDA $08 3
PHA 3
RTS 6
or similar which isn't pretty but works (self modifying code isn't on
because we might re-enter mid execution)
Alan Cox [Sun, 1 Oct 2017 16:30:49 +0000 (17:30 +0100)]
fcc: add the ability to pass arguments directly to the underlying compiler
Please only use this for debug as the goal is to make fcc eventually be a
generic front end that hides all the differences!
Usage is like gcc
fcc -Wc,-sdcc-option
Alan Cox [Sat, 30 Sep 2017 22:49:08 +0000 (23:49 +0100)]
65c816: fix fork stack shifting
We now run the child - and bomb when the parent is switched back in .. 8(
Alan Cox [Sat, 30 Sep 2017 21:32:09 +0000 (22:32 +0100)]
INSTALL: /opt/fcc note
Alan Cox [Sat, 30 Sep 2017 21:30:48 +0000 (22:30 +0100)]
INSTALL: we now have simple install instructions of sorts
Some make targets to auto-gen root file systems are still needed
Alan Cox [Sat, 30 Sep 2017 21:26:09 +0000 (22:26 +0100)]
Makefile: install crt0 and libc
Alan Cox [Sat, 30 Sep 2017 19:41:49 +0000 (20:41 +0100)]
libc: Add the missing tsearch functions
This leaves the hash tables (hsearch etc) and ftw/nftw as the only big APIs
we are missing.
Alan Cox [Sat, 30 Sep 2017 19:12:51 +0000 (20:12 +0100)]
libc: and add roundf to Z80 build for testing
We don't yet build the maths lib for 6809 but should do
Alan Cox [Sat, 30 Sep 2017 19:12:31 +0000 (20:12 +0100)]
sgetl/sputl: fix silly error
Alan Cox [Sat, 30 Sep 2017 19:12:07 +0000 (20:12 +0100)]
Library: add round and roundf
Alan Cox [Sat, 30 Sep 2017 18:35:24 +0000 (19:35 +0100)]
Library: add round.c to the maths library
Alan Cox [Sat, 30 Sep 2017 18:28:08 +0000 (19:28 +0100)]
Library: update the API list
We still have some gaps in the odder bits of library space
Alan Cox [Sat, 30 Sep 2017 18:20:15 +0000 (19:20 +0100)]
65c816: note more things to fix
Alan Cox [Sat, 30 Sep 2017 18:19:49 +0000 (19:19 +0100)]
v65: note a 6502 assumption we are making
Alan Cox [Sat, 30 Sep 2017 18:19:08 +0000 (19:19 +0100)]
library: add sgetl and sputl
Alan Cox [Sat, 30 Sep 2017 18:18:47 +0000 (19:18 +0100)]
getopt: correct details of prototype (cc65 cares about the difference)
Alan Cox [Sat, 30 Sep 2017 18:18:25 +0000 (19:18 +0100)]
6502: fix Library build
Alan Cox [Sat, 30 Sep 2017 17:56:24 +0000 (18:56 +0100)]
README.binfmt: Document executable format and related data
Also document the proposed changes
Alan Cox [Sat, 30 Sep 2017 13:06:29 +0000 (14:06 +0100)]
Makefile: ensure fcc path is present
Alan Cox [Fri, 29 Sep 2017 21:52:48 +0000 (22:52 +0100)]
Makefile: split CPU and USERCPU
Alan Cox [Fri, 29 Sep 2017 21:46:54 +0000 (22:46 +0100)]
65c816: ld config file
Alan Cox [Fri, 29 Sep 2017 21:46:01 +0000 (22:46 +0100)]
ld65-65c816: config file for near 64K sized binaries
Alan Cox [Fri, 29 Sep 2017 21:39:15 +0000 (22:39 +0100)]
coco2cart: link file
Alan Cox [Fri, 29 Sep 2017 21:38:50 +0000 (22:38 +0100)]
kernel: simplify Makefile
Alan Cox [Fri, 29 Sep 2017 21:38:27 +0000 (22:38 +0100)]
Makefile: tweaks for some 6809 stuff
With this 6809 works
Alan Cox [Fri, 29 Sep 2017 21:16:28 +0000 (22:16 +0100)]
Applications: remove now dead Makefiles
Alan Cox [Fri, 29 Sep 2017 21:15:24 +0000 (22:15 +0100)]
Makefile: change top level makefile for new setup
Alan Cox [Fri, 29 Sep 2017 21:14:35 +0000 (22:14 +0100)]
Applications: Update for new Makefile setup
We now have a Makefile.$(CPU) for each - not all are complete yet but the
rest can be filled in, or null targetted if not relevant to that platform.
Alan Cox [Fri, 29 Sep 2017 21:12:26 +0000 (22:12 +0100)]
Library: Makefile changes so we can have a saner build set up
Alan Cox [Fri, 29 Sep 2017 21:11:35 +0000 (22:11 +0100)]
TODO: swap free reporting is now done
Alan Cox [Fri, 29 Sep 2017 21:11:21 +0000 (22:11 +0100)]
tools: fix makeversion
Alan Cox [Fri, 29 Sep 2017 21:10:58 +0000 (22:10 +0100)]
README: update and remove obsolete bits
Alan Cox [Fri, 29 Sep 2017 21:10:39 +0000 (22:10 +0100)]
Library: preparations for sorting out Makefiles
Alan Cox [Fri, 29 Sep 2017 21:10:09 +0000 (22:10 +0100)]
syscalls.h: fix error in headers
Alan Cox [Fri, 29 Sep 2017 14:54:32 +0000 (15:54 +0100)]
kernel: remove obsolete CP/M bits
Alan Cox [Thu, 28 Sep 2017 20:43:53 +0000 (21:43 +0100)]
bank16: trivial tidy
Alan Cox [Thu, 28 Sep 2017 20:43:37 +0000 (21:43 +0100)]
swap: add reporting of swap space free/available
Alan Cox [Thu, 28 Sep 2017 20:42:13 +0000 (21:42 +0100)]
kernel.h: add CPu types
Alan Cox [Thu, 28 Sep 2017 20:40:59 +0000 (21:40 +0100)]
uanme: extend the sysinfo block and add swap bits to it
Yes this breaks uname() calls so one or two things need recompiling but better
to do it now than later.
For the moment it adds the CPU identifier, more space for CPU info data,
space for some expansion and also gets ready to add the swap info so free
can show swap state.
Alan Cox [Tue, 26 Sep 2017 13:23:14 +0000 (14:23 +0100)]
Makefile pieces for 65c816
Alan Cox [Tue, 26 Sep 2017 13:21:38 +0000 (14:21 +0100)]
65c816: fix bank setting bug
With this fixed we return from syscalls on the right DP and lo and behold
init now runs as far as fork().
Alan Cox [Tue, 26 Sep 2017 13:01:38 +0000 (14:01 +0100)]
65c816: fix uputw()
Alan Cox [Tue, 26 Sep 2017 13:01:23 +0000 (14:01 +0100)]
65c816: note syscall vector in readme
Alan Cox [Tue, 26 Sep 2017 13:00:23 +0000 (14:00 +0100)]
execve: note a thing to check, do a spot tidy
Alan Cox [Tue, 26 Sep 2017 12:59:55 +0000 (13:59 +0100)]
65c816: fix more asm paths
Alan Cox [Mon, 25 Sep 2017 14:31:30 +0000 (15:31 +0100)]
v65c816: fix platform code silliness
Alan Cox [Mon, 25 Sep 2017 14:30:36 +0000 (15:30 +0100)]
65c816: fix various bugs in the core code
With the platform bugs also fixed this takes us to the point that we start
running init and begin to make progress until we take an interrupt in user
mode, at which point badness happens
Alan Cox [Mon, 25 Sep 2017 14:30:11 +0000 (15:30 +0100)]
cpu-65c816: note 8MB limit in current logic
Alan Cox [Sun, 24 Sep 2017 23:59:41 +0000 (00:59 +0100)]
v65c816: fix disk driver bug
Did I ever mention how much I hate the 6402 lda $n,x syntax being for two
completely different things and magically determined unless you remember to
threaten the assembler with violence ?
Alan Cox [Sun, 24 Sep 2017 23:41:41 +0000 (00:41 +0100)]
65c816: tidy up hardcoded offset
Alan Cox [Sun, 24 Sep 2017 23:00:27 +0000 (00:00 +0100)]
v658c16: fix memory size reporting
512K not 8K !
Alan Cox [Sun, 24 Sep 2017 22:57:46 +0000 (23:57 +0100)]
65c816: fix interrupt return path for the kernel case
Was pulling A as 8 not 16bit, grrr.
With this fixed we can try (and fail) to mount a rootfs, but we are messing
something up as bootdev: 0 return gives us a psleep: voododo panic.
Alan Cox [Sun, 24 Sep 2017 01:05:23 +0000 (02:05 +0100)]
v64: ouch .... how did that ever work ?
Alan Cox [Sun, 24 Sep 2017 01:04:54 +0000 (02:04 +0100)]
65c816: update the fork code to copy the DP/S area and move S
Alan Cox [Sun, 24 Sep 2017 01:04:12 +0000 (02:04 +0100)]
65c816: further updates
This is sufficient to get us to the point we enable interrupts, run platform
interrupt the first time and then explode on the return path due to what looks
like a stack imbalance
Alan Cox [Sat, 23 Sep 2017 17:58:04 +0000 (18:58 +0100)]
cpu-65c816: add notes
Alan Cox [Sat, 23 Sep 2017 17:57:48 +0000 (18:57 +0100)]
v65c816: remove dead code
Alan Cox [Sat, 23 Sep 2017 17:57:27 +0000 (18:57 +0100)]
v65c816: make bank code auto-select right number of banks
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.
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
Alan Cox [Fri, 22 Sep 2017 22:38:38 +0000 (23:38 +0100)]
65c816: Makefile
Alan Cox [Fri, 22 Sep 2017 22:37:41 +0000 (23:37 +0100)]
65c816: further updates
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
Alan Cox [Thu, 21 Sep 2017 21:17:50 +0000 (22:17 +0100)]
65c816: this mornings fiddling
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.