Alan Cox [Wed, 13 Mar 2019 20:50:34 +0000 (20:50 +0000)]
kernel: core changes to get uint_fast8_t into the drivr layer
This whole set of work saves us a mindboggling 2.2K on 8080/8085 !
Alan Cox [Wed, 13 Mar 2019 20:48:55 +0000 (20:48 +0000)]
usermem: Fix accidentally 16bitisms
In some 32bit cases we use the generic valaddr(). Thus we shouldn't cast things
to 16bit or hardcode 0xFFFF. Fix these.
Alan Cox [Wed, 13 Mar 2019 20:47:57 +0000 (20:47 +0000)]
syscall_exec32: using unsigned for names
Alan Cox [Wed, 13 Mar 2019 18:53:29 +0000 (18:53 +0000)]
msm5832: sync to new prototypes
Alan Cox [Wed, 13 Mar 2019 18:52:40 +0000 (18:52 +0000)]
v8080: sync tty to new prototypes
Alan Cox [Wed, 13 Mar 2019 18:52:17 +0000 (18:52 +0000)]
ide: optimise internal logic for uint_fast8_t
Alan Cox [Wed, 13 Mar 2019 18:51:43 +0000 (18:51 +0000)]
v8080: change to match new prototypes
Alan Cox [Wed, 13 Mar 2019 18:44:19 +0000 (18:44 +0000)]
tty: use _fast8_t types
This affects the core and the platform code but as only 8080 and 8085 currently
have a non char fast type we don't have to fix it all up at once
Alan Cox [Wed, 13 Mar 2019 18:31:47 +0000 (18:31 +0000)]
v8080: add the floppy driver I forgot to commit originally
Alan Cox [Wed, 13 Mar 2019 18:30:26 +0000 (18:30 +0000)]
v8080: low hanging fruit for _fast8_t
Alan Cox [Wed, 13 Mar 2019 18:27:06 +0000 (18:27 +0000)]
v85: use _fast8_t types
Alan Cox [Wed, 13 Mar 2019 18:26:32 +0000 (18:26 +0000)]
kernel: use _fast8_t types
Alan Cox [Wed, 13 Mar 2019 18:25:34 +0000 (18:25 +0000)]
devide_discard: tidy up some particularly horrible code gen
Alan Cox [Wed, 13 Mar 2019 18:24:05 +0000 (18:24 +0000)]
cpu: introduce _fast8_t types
The 8080 compiler is much happier using 16bits for working values
Alan Cox [Tue, 12 Mar 2019 23:21:02 +0000 (23:21 +0000)]
crt0_nostdio-z80: remove bogus ;
Alan Cox [Tue, 12 Mar 2019 23:20:43 +0000 (23:20 +0000)]
ps: adopt new p_time meaning and tidy output further
Alan Cox [Tue, 12 Mar 2019 22:58:05 +0000 (22:58 +0000)]
kernel: change p_time (the start time)
We really want to know this in ticks not time otherwise it gets nonsensical
when you set the clock. In particular init is almost certainly created with a
bogus time of day.
It's then easy enough to fix ps to instead ask for the tick counter and do
the maths relative to current time to work out what is going on.
Also conveniently fixes the 2038 issue
Alan Cox [Tue, 12 Mar 2019 22:57:41 +0000 (22:57 +0000)]
timer: actually we have until a bit after 2100 to fix this
Alan Cox [Tue, 12 Mar 2019 22:50:34 +0000 (22:50 +0000)]
ps: note something to revisit
Alan Cox [Tue, 12 Mar 2019 22:48:06 +0000 (22:48 +0000)]
inode: fix the pipe deadlock
I think this will do the trick. It could do with more review and testing.
Alan Cox [Tue, 12 Mar 2019 22:02:08 +0000 (22:02 +0000)]
v85: don't keep temporaries
We are no longer debugging the discard tool
Alan Cox [Tue, 12 Mar 2019 22:01:38 +0000 (22:01 +0000)]
ps: fix formatting messes
Alan Cox [Tue, 12 Mar 2019 22:01:10 +0000 (22:01 +0000)]
v85: add discard segment
We don't yet reclaim it for buffers
Alan Cox [Tue, 12 Mar 2019 21:59:35 +0000 (21:59 +0000)]
discard85: make this work
Alan Cox [Tue, 12 Mar 2019 21:59:18 +0000 (21:59 +0000)]
ack2kernel: don't core dump if code goes over the end of RAM
Alan Cox [Tue, 12 Mar 2019 21:58:24 +0000 (21:58 +0000)]
cpu-8080: clean up header a bit
Alan Cox [Tue, 12 Mar 2019 16:51:10 +0000 (16:51 +0000)]
syscall_fs: remove dead function
Alan Cox [Tue, 12 Mar 2019 16:45:53 +0000 (16:45 +0000)]
syscall_fs3: remove some temporaries that make code generation worse
Alan Cox [Tue, 12 Mar 2019 00:18:51 +0000 (00:18 +0000)]
v85: use 8085 optimized tricks.s
Alan Cox [Tue, 12 Mar 2019 00:18:33 +0000 (00:18 +0000)]
8085: minimal optimizations for fixed bank
Alan Cox [Tue, 12 Mar 2019 00:15:22 +0000 (00:15 +0000)]
usermem_std-8085: and with uput it's easy to do uget
Alan Cox [Tue, 12 Mar 2019 00:11:52 +0000 (00:11 +0000)]
usermem_std-8085: add optimized uput
Alan Cox [Tue, 12 Mar 2019 00:07:33 +0000 (00:07 +0000)]
v85: use 8085 optimization work
Alan Cox [Tue, 12 Mar 2019 00:07:14 +0000 (00:07 +0000)]
8085: some basic 8085 optimizing work
Alan Cox [Tue, 12 Mar 2019 00:06:44 +0000 (00:06 +0000)]
cpu-8080: remove a fixed fixme
Alan Cox [Mon, 11 Mar 2019 20:04:40 +0000 (20:04 +0000)]
68000: dw Makefile
Alan Cox [Mon, 11 Mar 2019 20:04:00 +0000 (20:04 +0000)]
8080: commit games Makefile
We don't build most games due a compiler problem
Alan Cox [Mon, 11 Mar 2019 14:17:57 +0000 (14:17 +0000)]
usermem: fix warning caused by missing cast
Alan Cox [Sun, 10 Mar 2019 23:33:54 +0000 (23:33 +0000)]
easy-z80: arrange memory map correctly for alignments
And with this it seems to actually work
Alan Cox [Sun, 10 Mar 2019 01:05:59 +0000 (01:05 +0000)]
easyz80: we need to di before setup
Alan Cox [Sun, 10 Mar 2019 00:42:03 +0000 (00:42 +0000)]
sh: we don't use stdio so don't suck it in at all
And no .. fsh is still too big to run in 32K userspace sorry
Alan Cox [Sun, 10 Mar 2019 00:41:10 +0000 (00:41 +0000)]
sh: fix out of memory handling
The original code doesn't actually handle out of memory but explodes. On a PDP11
I guess that's merely annoying, on a Z80 it tends to break more. Add a proper
out of memory exit.
Alan Cox [Sun, 10 Mar 2019 00:31:07 +0000 (00:31 +0000)]
z80: brk to the correct point in the relocatable binaries
In the cases where we couldn't put the relocations into the end of data and
make it BSS we end up with a binary that is a bit bigger than expected. Most
stuff doesn't care but for correctness and tight memory cases use brk() to
put the end of BSS back at the right point so future sbrk() calls give the
expected result.
Alan Cox [Sun, 10 Mar 2019 00:29:43 +0000 (00:29 +0000)]
relocbin: Fix bogus BSS sizes
l__DATA is unsigned so the old check did not work, instead it wrote a large
effectively negative value in the header. Due to a pair of bugs in the kernel
that happened to sort of work.
The kernel is fixed. This patch fixes the toolchain.
Alan Cox [Sun, 10 Mar 2019 00:27:46 +0000 (00:27 +0000)]
usermem: correct wrapped sizes
There are cases it is valid to pass a base and size that wrap, if your user space
runs in the high memory area. On the Linc80 this shows up and breaks the
n_open optimizations because instead of FE00 200 giving 100 as it should it gives
an error.
This was also the bug that happened to save us with binaries with the wrong BSS
size
Alan Cox [Sun, 10 Mar 2019 00:26:22 +0000 (00:26 +0000)]
syscall_exec16: Fix BSS wrap bug
If the binary fits but it has a huge BSS value then kernel wrongly allows it to
start. Because of some other bugs and quirks it ends up running sanely for most
platforms but the BSS is not cleared.
This breaks the current builds of /bin/sh so you'll need to build a new one with
the tools patches that follow this applied.
Alan Cox [Sun, 10 Mar 2019 00:24:31 +0000 (00:24 +0000)]
linc80: send the console messages to SIO B
Alan Cox [Sun, 10 Mar 2019 00:23:41 +0000 (00:23 +0000)]
easy-z80: add context switchers to the z80sio
As we use multiple banks for top of memory common copies we have no true
common so we need to land the serial I/O outside of common so must bank it in
Alan Cox [Sun, 10 Mar 2019 00:22:55 +0000 (00:22 +0000)]
z80sio: we only want IRQ handlers to stack switch if needed
The other functions are only called in kernel context
Alan Cox [Sat, 9 Mar 2019 19:42:31 +0000 (19:42 +0000)]
easyz80: Fix up all the IM2 handling and serial stuff
Alan Cox [Sat, 9 Mar 2019 19:41:58 +0000 (19:41 +0000)]
z80sio: Fix a bug in the linc80 logic and add macros for non fixed common cases
Alan Cox [Sat, 9 Mar 2019 17:32:22 +0000 (17:32 +0000)]
easyz80: fix SIO vector loading and CTC vectors
This gets us to the point timer events are happening but there is no input
response.
Alan Cox [Sat, 9 Mar 2019 12:15:57 +0000 (12:15 +0000)]
cp: remove struct assignment
This allows it to build with older SDCC correctly
Alan Cox [Fri, 8 Mar 2019 23:28:32 +0000 (23:28 +0000)]
easy-z80: Initial port framework for easy-z80
This in theory is a complete port to Max Malinov and Sergey Kiselev's
Easy Z80 SBC including CTC timing, serial port baud rate control and using IM2
and fast IM2 based serial handlers (but not yet softirq).
It's not yet been debugged/tested on any kind of emulation or actual board
however.
Alan Cox [Thu, 7 Mar 2019 14:33:55 +0000 (14:33 +0000)]
trdify: Make .TRD disk images
This is used to generate pentagon and scorpion bootable floppy images for the
kernel
Alan Cox [Thu, 7 Mar 2019 14:33:29 +0000 (14:33 +0000)]
tgl6502: goodbye
Alan Cox [Thu, 7 Mar 2019 14:33:04 +0000 (14:33 +0000)]
zxdiv48: a bug I noticed whilst working on pentagon
Still not tested/debugged yet
Alan Cox [Thu, 7 Mar 2019 14:32:23 +0000 (14:32 +0000)]
pentagon: more work in progress for fixed 16K ROM systems
Alan Cox [Thu, 7 Mar 2019 14:31:58 +0000 (14:31 +0000)]
scorpion: /dev/lp and turbo
Alan Cox [Thu, 7 Mar 2019 14:31:22 +0000 (14:31 +0000)]
pentagon1024: /dev/lp support and turbo
Alan Cox [Thu, 7 Mar 2019 14:30:56 +0000 (14:30 +0000)]
dev: add generic lp driver
Alan Cox [Wed, 6 Mar 2019 00:36:41 +0000 (00:36 +0000)]
scorpion: Initial scorpion support (Scorpion 256)
Alan Cox [Wed, 6 Mar 2019 00:35:15 +0000 (00:35 +0000)]
tricks-big: remove bogus leftover or
Fixes the crash when we use the lower banks
Alan Cox [Tue, 5 Mar 2019 23:12:21 +0000 (23:12 +0000)]
pentagon: add the tricks macros to keep in sync
Alan Cox [Tue, 5 Mar 2019 23:06:16 +0000 (23:06 +0000)]
pentagon: bring back pieces from the pentagon1024
There is still much to be done to support older Pentagons but keep the tree in
sync
Alan Cox [Tue, 5 Mar 2019 23:04:29 +0000 (23:04 +0000)]
pentagon1024: get it building and running
Alan Cox [Tue, 5 Mar 2019 23:03:27 +0000 (23:03 +0000)]
pentagon1024: add macros to make the tricks-big file shareable
Scorpions need something a bit different
Alan Cox [Tue, 5 Mar 2019 23:03:06 +0000 (23:03 +0000)]
zx: tidy tty references
Alan Cox [Tue, 5 Mar 2019 23:02:37 +0000 (23:02 +0000)]
ide: remove needless devtty includes
Alan Cox [Tue, 5 Mar 2019 22:23:28 +0000 (22:23 +0000)]
pentagon: pentagon1024
Copy the work so far over to a new platform because the older Pentagon systems
don't have the RAM0 low mapping and will need something a bit different.
As we are dependent upon the 1024K features we can just hardcode 1MB of RAM.
Not that you can use it all right now. 16 processes at a time is 512K and given
the task switch cost it's not clear how you'd use 32 processes in memory sanely.
We could add a 512K RAM disc but then with an vaguely modern CF card the
difference between banked RAM copies and CF card I/O is actually in favour
of using the CF card.
Maybe we'll just have to invent banked applications for such systems one day.
Alan Cox [Tue, 5 Mar 2019 00:56:27 +0000 (00:56 +0000)]
discard85: first cut at 8085 discard hack for the assembler
Not yet tested
Alan Cox [Tue, 5 Mar 2019 00:52:17 +0000 (00:52 +0000)]
pentagon etc: commit the banking support code
This is a lot more complex than the Spectrum 128K as we have a proper set of
banking to manage and we need to treat the 8000-BFFF as a cache. This is good
enough to get us to init forking, but the world ends not long afterwards
Alan Cox [Tue, 5 Mar 2019 00:51:30 +0000 (00:51 +0000)]
pentagon: fix various bank handling bugs
Alan Cox [Tue, 5 Mar 2019 00:50:45 +0000 (00:50 +0000)]
pentagon: fix the bank numbers
We want 0-7 - the upper bit is accounted for by the 0x40
Alan Cox [Tue, 5 Mar 2019 00:50:27 +0000 (00:50 +0000)]
pentagon: remove pointless define
Alan Cox [Tue, 5 Mar 2019 00:49:56 +0000 (00:49 +0000)]
pentagon: set the bank size correctly
Alan Cox [Tue, 5 Mar 2019 00:49:36 +0000 (00:49 +0000)]
nemoide: optimize a silly code path
Alan Cox [Mon, 4 Mar 2019 01:28:21 +0000 (01:28 +0000)]
pentagon: IDE interface update
This gets us to the point that we parse the partition table and then fail to
load init.
Alan Cox [Sun, 3 Mar 2019 17:41:22 +0000 (17:41 +0000)]
pentagon: Fix banking changes
With these fixed we get to a bootdev: prompt and can look at disk drivers
Alan Cox [Sun, 3 Mar 2019 16:57:22 +0000 (16:57 +0000)]
z80: build trdify
Alan Cox [Sun, 3 Mar 2019 16:56:24 +0000 (16:56 +0000)]
pentagon: sort the loader out (sort of anyway)
With this done we load an image and seem to blow up on the first interrupt or
thereabouts whilst probing for disks.
Alan Cox [Sun, 3 Mar 2019 16:55:30 +0000 (16:55 +0000)]
Makefile: clean up bank files
Alan Cox [Sat, 2 Mar 2019 21:00:36 +0000 (21:00 +0000)]
CREDITS: this was fixed remove the FIXME
Alan Cox [Sat, 2 Mar 2019 20:26:43 +0000 (20:26 +0000)]
Makefile: update
Alan Cox [Sat, 2 Mar 2019 20:10:07 +0000 (20:10 +0000)]
sc108/sc114: merge the ports and use the ROM hooks
We can't use them as we'd like but we can use them with a bit of extra hackery.
Drop using the ROM for serial I/O - it's not really worth it or a good plan.
Alan Cox [Fri, 1 Mar 2019 22:21:52 +0000 (22:21 +0000)]
syscall_other: final (I hope) batch of uint8_t strict cleanup
Alan Cox [Fri, 1 Mar 2019 22:20:24 +0000 (22:20 +0000)]
syscalls: fix remaining char v uint8_t warnings
The kernel now handles everything it can unsigned so that we don't give the
compilers needless work to do on the processors like the 8080 and 6502 that
suck at sign extending.
Alan Cox [Fri, 1 Mar 2019 22:19:52 +0000 (22:19 +0000)]
v85: add 6850 ACIA speed/setting controls
They don't do anything but they are better example for real devices
Alan Cox [Fri, 1 Mar 2019 22:18:54 +0000 (22:18 +0000)]
cp: replace cp (and it can be used for mv ln) with a nice version
It's still under 20K, it does multiple jobs and it adds all the SUS expected
behaviours.
Alan Cox [Fri, 1 Mar 2019 22:12:43 +0000 (22:12 +0000)]
zxdiv48: minor Makefile tweakery
Still not had time to actually start getting this running
Alan Cox [Fri, 1 Mar 2019 22:12:17 +0000 (22:12 +0000)]
zxdiv: turn on ZX Uno features if present
Alan Cox [Fri, 1 Mar 2019 22:11:33 +0000 (22:11 +0000)]
zxuno: add some helpers for putting the ZX Uno into 14Mhz mode etc
From a Fuzix perspective we want to turn on all the features regardless
Alan Cox [Fri, 1 Mar 2019 19:25:48 +0000 (19:25 +0000)]
syscall_net: do the change so we keep the socket number in a sane place
Alan Cox [Fri, 1 Mar 2019 19:25:25 +0000 (19:25 +0000)]
opendir: correct const usage to match standard
Alan Cox [Fri, 1 Mar 2019 19:24:54 +0000 (19:24 +0000)]
getopt: correct const v non consts in prototype to match standard
Alan Cox [Fri, 1 Mar 2019 13:56:59 +0000 (13:56 +0000)]
visualize: really _CODE is bank 0 so report it as 0 not 1 in bank 0
Alan Cox [Fri, 1 Mar 2019 13:55:29 +0000 (13:55 +0000)]
visualize: add in more of the bank types
This allows it to work on stuff like the trs80m1
Alan Cox [Thu, 28 Feb 2019 23:33:55 +0000 (23:33 +0000)]
tools: add a maketap tool for spectrum .tap files
We don't yet use it in anything but it's handy to have.
Alan Cox [Thu, 28 Feb 2019 22:28:50 +0000 (22:28 +0000)]
linc80: update notes
Alan Cox [Thu, 28 Feb 2019 22:15:16 +0000 (22:15 +0000)]
flat: flat models have their own valaddr and it needs the new prototype