Will Sowerbutts [Fri, 24 Apr 2015 19:47:01 +0000 (20:47 +0100)]
zeta-v2: Add support for PPIDE storage
Will Sowerbutts [Fri, 24 Apr 2015 19:45:25 +0000 (20:45 +0100)]
devide: Support for IDE controllers which do not expose the IDE
registers directly on the CPU bus
Will Sowerbutts [Fri, 24 Apr 2015 18:59:22 +0000 (19:59 +0100)]
p112: Move device_init() to DISCARD segment
Will Sowerbutts [Mon, 20 Apr 2015 19:30:59 +0000 (20:30 +0100)]
zeta-v2: Move kernel down to start at address 0x0088
Will Sowerbutts [Fri, 17 Apr 2015 19:20:34 +0000 (20:20 +0100)]
Kernel: Platform TTY_INIT_BAUD can override the default baud rate for
all ttys (including the console)
Alan Cox [Fri, 24 Apr 2015 11:43:17 +0000 (12:43 +0100)]
vfprintf: use int not short for va_arg
This is needed on 6809, but should be correct for the general case.
Tormod Volden [Fri, 24 Apr 2015 11:08:48 +0000 (13:08 +0200)]
lowlevel-6809.s: ashlsi3 workaround
When calling ashlsi3 (taken from the libgcc source) the arguments
are not set up on the stack as the ashlsi3 code expects.
It might be a bug in gcc-6809, but until we get this sorted out,
use this little prologue to have the function work correctly.
This was the last hurdle to get a relatively usable system going.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Wed, 22 Apr 2015 20:47:25 +0000 (22:47 +0200)]
process.c: Signal masks are 32 bit
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Wed, 22 Apr 2015 20:47:24 +0000 (22:47 +0200)]
lowlevel-6809.s: Fix up signal dispatch routine
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Wed, 22 Apr 2015 20:47:23 +0000 (22:47 +0200)]
dragon-nx32: Add jump to null_handler at 0
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Wed, 22 Apr 2015 20:47:22 +0000 (22:47 +0200)]
6809: Require lwtools 4.11
Earlier releases have a index d,s bug that bites us.
Also it seems to build fine on a native 64-bit build of gcc 4.6.4
with William Astle's 6809 patch (from the lwtools repo).
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Tue, 21 Apr 2015 22:48:06 +0000 (23:48 +0100)]
stdio: tag macros for review
If the isfoo macros were a lose, then odds on this is as well
Tormod Volden [Tue, 21 Apr 2015 21:19:29 +0000 (23:19 +0200)]
crt0_6809: Initialize stdio
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 21 Apr 2015 21:19:28 +0000 (23:19 +0200)]
dragon-nx32: Add missing step in build instructions
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 20 Apr 2015 22:28:43 +0000 (23:28 +0100)]
zx128: tidy tricks.s slightly
We are still blowing up when we swap in and return to the process
Tormod Volden [Mon, 20 Apr 2015 21:22:48 +0000 (23:22 +0200)]
dragon32-nx: Preserve U and Y during task switching
Although we were not modifying them in our assembly routines,
the C code around depend on these registers (gcc-6809 expects
them to be preserved across function calls), so when a process
is switched in it needs the same U and Y as when it was switched
out, whether by switchout or fork.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 20 Apr 2015 22:09:14 +0000 (23:09 +0100)]
z80pack: Fix the micropack build and the swap
Alan Cox [Mon, 20 Apr 2015 21:42:25 +0000 (22:42 +0100)]
zx128: update tricks
Add swap in hooks
Various bug fixes
Some debugging (for now)
Helper for the new banker to avoid an unneeded exchange on a swapin
Alan Cox [Mon, 20 Apr 2015 21:42:14 +0000 (22:42 +0100)]
zx128: link the new banker
Alan Cox [Mon, 20 Apr 2015 21:41:54 +0000 (22:41 +0100)]
zx128: we pre-initialize these
Alan Cox [Mon, 20 Apr 2015 21:41:32 +0000 (22:41 +0100)]
microdrive: remove stuff that is now in the banker where it should be
Alan Cox [Mon, 20 Apr 2015 21:41:15 +0000 (22:41 +0100)]
zx128: turn on custom banker
Alan Cox [Mon, 20 Apr 2015 21:40:54 +0000 (22:40 +0100)]
zx128: introduce a private banker so we can do swap nicely
Alan Cox [Mon, 20 Apr 2015 21:40:33 +0000 (22:40 +0100)]
microdrive: map the correct page
Alan Cox [Mon, 20 Apr 2015 21:40:04 +0000 (22:40 +0100)]
ubee: this isn't a usable port but just keep the line in sync
Alan Cox [Mon, 20 Apr 2015 21:38:14 +0000 (22:38 +0100)]
zx128: use screen for debug
Alan Cox [Mon, 20 Apr 2015 21:37:46 +0000 (22:37 +0100)]
z80pack: update config.h for new style swap
Alan Cox [Mon, 20 Apr 2015 21:33:23 +0000 (22:33 +0100)]
trs80: bring in line with new swap (compile tested only)
Alan Cox [Mon, 20 Apr 2015 21:33:07 +0000 (22:33 +0100)]
bankfixed: correct p_page error
Alan Cox [Mon, 20 Apr 2015 21:26:14 +0000 (22:26 +0100)]
swap: Assorted fixes and changes
The swapper writes memory out in chunks that it knows fit one "page",
whether that is a bank number of a page number. It also provides a
swap_map function so you can map swap.
Rather than pass the process it passes the correct page number for each
write and no write crosses a bank.
Also allow the use of page2 for memory while swapping. That just requires
the value to be saved.
This changes the swap API so various drivers will need fixes and testing. It
should however take us closer to having the swap interface properly split
from the memory model, and to allowing swap in awkward cases like 16K banking.
Alan Cox [Mon, 20 Apr 2015 21:25:02 +0000 (22:25 +0100)]
z80: Fix IRQ handling for NMOS devices
Alan Cox [Mon, 20 Apr 2015 21:24:44 +0000 (22:24 +0100)]
z80: fix banked di/irqrestore
Alan Cox [Sun, 19 Apr 2015 22:08:38 +0000 (23:08 +0100)]
zx128: swap in logic
With this in place we swap data out, we read it back in and then we crash.
Further debugging needed yet.
Alan Cox [Sun, 19 Apr 2015 20:52:41 +0000 (21:52 +0100)]
zx128: Fix swap out
We still don't swap in correctly (we panic) but the outgoing swap now appears
to work and writes 32K to the microdrive.
Tormod Volden [Sun, 19 Apr 2015 16:43:45 +0000 (18:43 +0200)]
dragon-nx32: After unstashing stack, use new stack pointer right away
The following jsr will otherwise possibly clobber the stack.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 19 Apr 2015 16:43:44 +0000 (18:43 +0200)]
dragon-nx32: Don't stuff uarea on switch to self
A little bit of optimization. More can be done on
the amount being copied over.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 19 Apr 2015 16:43:43 +0000 (18:43 +0200)]
dragon{,-nx32}: Block interrupts during DriveWire operations
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 19 Apr 2015 16:43:42 +0000 (18:43 +0200)]
dragon: fork() must return zero to child
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 19 Apr 2015 16:43:41 +0000 (18:43 +0200)]
dragon-nx32: Get dofork() into shape
Copy the process memory into the new process memory.
Prepare the old process to come back as if it was
switched out. And return zero in child process.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 19 Apr 2015 16:43:40 +0000 (18:43 +0200)]
dragon-nx32: runticks is 16 bit
This is wrong for many other ports as well.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 19 Apr 2015 16:43:39 +0000 (18:43 +0200)]
crt_6809: Fix argument and environ passing
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 16 Apr 2015 22:00:20 +0000 (00:00 +0200)]
include/syscall_name.h: fcntl and ioctl are variadic
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 16 Apr 2015 22:00:19 +0000 (00:00 +0200)]
6809 Fix syscall glue for variadic functions
gcc6809 uses a fastcall calling convention with the first argument
in X, the second and up on the stack. However, variadic functions
get all the arguments on the stack. We therefore mangle the stack
for these functions so that they appear as fastcall to the kernel.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 16 Apr 2015 22:00:18 +0000 (00:00 +0200)]
6809: Adjust syscall argument passing to caller convention
The calling user process will put the first argument in
X and the rest on the stack. Make sure this get carried over
to u_argn etc correctly.
Also make sure the return values from the system call is
handed back to the caller through the rti.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 16 Apr 2015 22:00:17 +0000 (00:00 +0200)]
dragon-nx32: Put kernel_flag in common
So that we can can use the empty SAM macros in
unix_syscall_entry, with user bank active.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 16 Apr 2015 22:00:16 +0000 (00:00 +0200)]
lowlevel-6809.s: u_callno is 8 bit
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:07 +0000 (23:23 +0200)]
Add const in utils/dosread include/regexp.h libs/atoi
gcc likes to have it consistent.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Wed, 15 Apr 2015 11:44:25 +0000 (12:44 +0100)]
consts: Fix other consts
Originally from Tormod Volden but I had to fix the DOS mangling of some
of the files to apply them
Alan Cox [Wed, 15 Apr 2015 11:42:26 +0000 (12:42 +0100)]
dosread: remove DOS formatting
(and correct missing const on main argv[] via Tormod Volden)
Tormod Volden [Tue, 14 Apr 2015 21:23:17 +0000 (23:23 +0200)]
dragon-nx32: Add system build instructions to README
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:16 +0000 (23:23 +0200)]
Add -X reverse endian option to build-filesystem script
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:15 +0000 (23:23 +0200)]
crt0_6809.s: Pass environ, argv and argc to main()
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:14 +0000 (23:23 +0200)]
6809 util: Link utilities with libgcc
For example a number of math functions are needed.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:13 +0000 (23:23 +0200)]
6809 libs: Use our str* and mem* functions
We will not be using the gcc stdlib when building
userland utilities.
And rename our own "libc" so that lwlink can find it.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:12 +0000 (23:23 +0200)]
Library: Add putchar_wrapper.c for use with libgcc
Once we link in libgcc.a it seems we need the putchar
without underscore (in C).
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:11 +0000 (23:23 +0200)]
crt0_6809.s: Set load page value for dragon-nx32
This must be changed back for e.g. the "dragon" port.
Clearly this must be done in a better way.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:10 +0000 (23:23 +0200)]
crt0_6809.s: Create a .header section for executables
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:09 +0000 (23:23 +0200)]
crt0_6809.s: Fix typo in linker symbols strings
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Tue, 14 Apr 2015 21:23:08 +0000 (23:23 +0200)]
syscall6809.s: Use correct SWI number
Use SWI as set up in the vector table.
This is not NitrOS-9, I guess...
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Tue, 14 Apr 2015 00:00:49 +0000 (01:00 +0100)]
zx128/mdv: strengthen tools and fix the header write size
We now appear to read/write the fs correctly. Not yet sure why swap is
bombing out with an error 3 on sector 155.
Alan Cox [Mon, 13 Apr 2015 23:01:43 +0000 (00:01 +0100)]
zx128: further swap fixes
Alan Cox [Mon, 13 Apr 2015 22:51:57 +0000 (23:51 +0100)]
zx128: further steps to working Microdrive read/write
This fixes the motor select logic. We can now have multiple devices loaded
without getting in a nasty mess. Still a write corruption problem to be tracked
down and writes to mdv3 (swap) bomb for reasons not yet understood
Alan Cox [Mon, 13 Apr 2015 21:28:02 +0000 (22:28 +0100)]
zx128: initial code for swap on microdrive
Wheee...
Alan Cox [Mon, 13 Apr 2015 21:26:45 +0000 (22:26 +0100)]
bankfixed: deal with casting of SWAPBASE
Tormd Volden [Mon, 13 Apr 2015 11:14:29 +0000 (12:14 +0100)]
dragon-nx32 README: Add bit from Tormod that I lost
Tormod Volden [Sun, 12 Apr 2015 23:00:19 +0000 (01:00 +0200)]
6809: Try building Applications/utils
Still missing some bits though.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 12 Apr 2015 23:00:18 +0000 (01:00 +0200)]
6809: Fix library archive contents
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Sun, 12 Apr 2015 21:50:25 +0000 (22:50 +0100)]
Makefile/tools: add chkmdv
Handy for checking Microdrive write logic
Alan Cox [Sun, 12 Apr 2015 21:49:29 +0000 (22:49 +0100)]
Makefile: space fix
Tormod Volden [Sun, 12 Apr 2015 21:31:41 +0000 (23:31 +0200)]
Library: Build 6809 C library
The crt0_6809.s still needs some filling in.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Sun, 12 Apr 2015 20:26:30 +0000 (22:26 +0200)]
Library: Generate 6809 syscall glue
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Sun, 12 Apr 2015 16:45:44 +0000 (17:45 +0100)]
zx128, microdrive: Microdrive write support
Still somewhat fragile
Alan Cox [Sat, 11 Apr 2015 14:17:59 +0000 (15:17 +0100)]
zx128: kick out the experimental betadisk hacks
They cost us to much in memory layout and hassle and at best will be very
brittle. Instead we'll need a Betadisk with suitable rom hooks added (or
already present ?)
Alan Cox [Thu, 9 Apr 2015 09:17:21 +0000 (10:17 +0100)]
devmdv: add mdv_csum
Just need to build the tree so I can get a map file. The code to actual
compute the csum needs adding for write.
Alan Cox [Mon, 6 Apr 2015 12:16:17 +0000 (13:16 +0100)]
pad256: quote "$1" in case anyone uses silly names
Tormod Volden [Mon, 6 Apr 2015 10:38:08 +0000 (12:38 +0200)]
Add padding tool for DriveWire images
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 6 Apr 2015 12:13:49 +0000 (13:13 +0100)]
dragon-nx32: add patch to emulate nx32 in Xroar
Tormod Volden [Mon, 6 Apr 2015 10:38:09 +0000 (12:38 +0200)]
dragon-nx32: Add DWLOAD bootloader
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 6 Apr 2015 10:44:11 +0000 (11:44 +0100)]
dragon-nx32: doesn't support raw I/O yet so set the legacy flag
Without this binaries over 512 bytes long won't get loaded right
Tormod Volden [Mon, 6 Apr 2015 09:32:57 +0000 (11:32 +0200)]
Add new dragon-nx32 port
For Dragon 32 or 64 with an external banked memory
cartridge.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 6 Apr 2015 09:32:56 +0000 (11:32 +0200)]
dragon: TICKSPERSEC is 50
The IRQ is driven by the video VSYNC and is usually 50 Hz
for most Dragons. The Tano Dragon would be 60 Hz (NTSC).
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 6 Apr 2015 09:32:55 +0000 (11:32 +0200)]
dragon: Mangle debug outchar bytes for 6847
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 6 Apr 2015 09:32:54 +0000 (11:32 +0200)]
dragon: Fix stack offset in usermem uzero function
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 6 Apr 2015 09:32:53 +0000 (11:32 +0200)]
p6809.s: Remove fatal space inside register list operand
The assembler considers everything following a space as
a comment.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 6 Apr 2015 10:36:18 +0000 (11:36 +0100)]
filesys: trim trailing space
Tormod Volden [Mon, 6 Apr 2015 09:32:52 +0000 (11:32 +0200)]
filesys: Add DEBUG kprint in fmount()
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 6 Apr 2015 09:32:51 +0000 (11:32 +0200)]
dragon: Remove misplaced comment in commonmem.s
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 6 Apr 2015 09:32:50 +0000 (11:32 +0200)]
dragon: Do not link empty usermem_std-6809
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 6 Apr 2015 10:34:29 +0000 (11:34 +0100)]
zx128: first cut at write logic
Not yet wired up to checksum, and some of the delay loops need tuning so we
don't scribble too early.
Alan Cox [Tue, 31 Mar 2015 23:00:50 +0000 (00:00 +0100)]
graphics: fill out how MAP might work
Alan Cox [Tue, 31 Mar 2015 21:54:38 +0000 (22:54 +0100)]
nc100: first draft graphics and audio support
Alan Cox [Tue, 31 Mar 2015 21:53:48 +0000 (22:53 +0100)]
trs80: add initial prototype graphics card support
Alan Cox [Tue, 31 Mar 2015 21:53:18 +0000 (22:53 +0100)]
Makefile: build audio
Alan Cox [Tue, 31 Mar 2015 21:52:31 +0000 (22:52 +0100)]
graphics: first draft bits
Alan Cox [Tue, 31 Mar 2015 21:52:05 +0000 (22:52 +0100)]
kernel.h: reserve audio and graphics ioctl ranges
Alan Cox [Tue, 31 Mar 2015 21:51:11 +0000 (22:51 +0100)]
audio: add the base audio code and hooks
Alan Cox [Tue, 31 Mar 2015 21:50:35 +0000 (22:50 +0100)]
start: allow for platforms that have one possible boot device
If so dump all the bootdevice requesting stuff and just go
Alan Cox [Tue, 31 Mar 2015 21:50:15 +0000 (22:50 +0100)]
audio: first draft of an audio header and ioctl interface
Alan Cox [Tue, 31 Mar 2015 21:48:18 +0000 (22:48 +0100)]
z80: add in and out operators
(Not yet tested)
Tormod Volden [Tue, 31 Mar 2015 00:17:22 +0000 (02:17 +0200)]
Sync kernel09.def to updated kernel.def
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>