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>
Tormod Volden [Mon, 30 Mar 2015 21:25:05 +0000 (23:25 +0200)]
Standalone: Do not include stdio.h in fuzix_fs.h
xfs1a and xfs1b need a NULL definition, but they can pick
that from stddef.h.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Mon, 30 Mar 2015 21:25:04 +0000 (23:25 +0200)]
Standalone: Fix cross-endian disk image operation
A filesystem can now be created with mkfs -X,
manipulated with ucp, and successfully checked with
fsck.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Mon, 30 Mar 2015 22:53:20 +0000 (23:53 +0100)]
nc100: attach the boot block to the fuzix.bin not uzi.bin as it was long ago
Alan Cox [Mon, 30 Mar 2015 22:53:07 +0000 (23:53 +0100)]
nc100: correct README re sdas
Alan Cox [Mon, 30 Mar 2015 22:52:22 +0000 (23:52 +0100)]
nc100: tty bits
Fix the keymap for NC100
Output kernel messages to both serial and vt. This is useful as the emulator
defaults to exiting on DI HLT and doesn't let you read the messages
Alan Cox [Mon, 30 Mar 2015 22:52:03 +0000 (23:52 +0100)]
nc100: config for NC100 by default
Defaulting to NC200 is asking for pain
Alan Cox [Mon, 30 Mar 2015 22:51:18 +0000 (23:51 +0100)]
nc100: declare location of font
Without this it gets put in the wrong place and binman then packs it wrongly
for our crt0.s and we jump into the font not the C main..
Alan Cox [Mon, 30 Mar 2015 12:58:01 +0000 (13:58 +0100)]
nc100: Add forgotten nc100.def
Tormod Volden [Sun, 29 Mar 2015 22:05:19 +0000 (00:05 +0200)]
Standalone mkfs/fsck/xfs2 byte order fixes
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Sun, 29 Mar 2015 22:37:13 +0000 (23:37 +0100)]
px4plus: work on keyboard driver
Tormod Volden [Sun, 29 Mar 2015 13:13:21 +0000 (15:13 +0200)]
dragon: Add DriveWire support
Reads and writes have been tested both on real hardware
(bit-banger serial) and XRoar (Becker interface).
Thanks to Darren Atkinson and Boisy Pitre for the original
low-level routines!
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Sun, 29 Mar 2015 09:20:06 +0000 (10:20 +0100)]
px4plus: get it all building again
Still much left to do before it'll be bootable.
Alan Cox [Sun, 29 Mar 2015 09:15:10 +0000 (10:15 +0100)]
px4plus: add memory open/close for sidecar
Alan Cox [Sun, 29 Mar 2015 00:17:38 +0000 (00:17 +0000)]
px4plus: minor updates
Alan Cox [Sat, 28 Mar 2015 23:24:12 +0000 (23:24 +0000)]
px4,7508: expand the 7508 code a bit further
Still much to do including things like the keyboard decoding. Also not
clear what we should do with a lot of the events.
Alan Cox [Sat, 28 Mar 2015 23:23:21 +0000 (23:23 +0000)]
px4,sio: return the number of missed interrupts
Much cleaner than globals for it all
Alan Cox [Sat, 28 Mar 2015 22:28:09 +0000 (22:28 +0000)]
px4plus: carry on fleshing out all the I/O interfaces
Alan Cox [Sat, 28 Mar 2015 13:08:42 +0000 (13:08 +0000)]
superblock: magic number should not be signed
Tormod Volden [Fri, 27 Mar 2015 23:15:42 +0000 (00:15 +0100)]
dragon: add used() in tty_sleeping to silence warning
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Sat, 28 Mar 2015 12:49:54 +0000 (12:49 +0000)]
fsck: adjust message
Tormod Volden [Fri, 27 Mar 2015 23:15:39 +0000 (00:15 +0100)]
mkfs: Print message if host endianness differs
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Fri, 27 Mar 2015 23:15:38 +0000 (00:15 +0100)]
Change 6809 EMAGIC to 7E (JMP extended)
0E is JMP direct page, so 7E is easier to use.
Also change it in the not-finished zero trap.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Sat, 28 Mar 2015 12:41:32 +0000 (12:41 +0000)]
target.mk: Add target.mk files present in my tree but that I forgot to add
As noted by Tormod
Alan Cox [Fri, 27 Mar 2015 23:27:01 +0000 (23:27 +0000)]
px4plus: further updates mostly to the cartridge RAM logic
Alan Cox [Fri, 27 Mar 2015 20:13:49 +0000 (20:13 +0000)]
swap: correct comment
Alan Cox [Fri, 27 Mar 2015 20:13:00 +0000 (20:13 +0000)]
px4plus: Further updates
This fleshes out the task switching, splits up the various ROM and cartridge
logic and begins to put the rest of the system together
EtchedPixels [Thu, 26 Mar 2015 10:42:28 +0000 (10:42 +0000)]
Merge pull request #151 from willsowerbutts/ctypefix
Library: minor ctype build fixes
EtchedPixels [Mon, 23 Mar 2015 21:22:41 +0000 (21:22 +0000)]
Merge pull request #152 from davidgiven/apps
V7 app fixes
David Given [Mon, 23 Mar 2015 21:13:50 +0000 (22:13 +0100)]
Ansification, constification and smallifying pass --- now builds on 6502
and Z80 (and without warnings on gcc5). Added dummy execl and execlp
implementations for cc65 as at requires them.
--HG--
extra : source :
05427ece25076498a378abe9a783fb018bc70efd
Will Sowerbutts [Mon, 23 Mar 2015 19:10:30 +0000 (19:10 +0000)]
Library: minor ctype build fixes
Alan Cox [Sun, 22 Mar 2015 21:48:33 +0000 (21:48 +0000)]
px4plus: Initial cut of banking support
Nothing runnable yet but we now build the PX4/PX4 Plus as a set of banked ROM
images which is what is needed. The actual box has
64K RAM (some used for video)
32K OS ROM (CP/M) - overlays low 32K if switched in
2 x up to 32K ROM - overlay 0x6000-0xDFFF
The "intelligent" RAMdisc and the sidecar RAM discs are not memory mapped but
can be used for task switching/swap.
The floppy drive is serial attached at a whopping 19200 baud.
Alan Cox [Sun, 22 Mar 2015 21:47:09 +0000 (21:47 +0000)]
binmunge: warn on overflows