Alan Cox [Thu, 27 Nov 2014 01:06:39 +0000 (01:06 +0000)]
dragon: rewrite the setup code
We load the first ROM with an unpacking routine and all the data. On boot
it sets up the SAM (must be done from ROM), the PIAs and then says hello,
clears memory and moves all the RAM objects from a DECB stream we add
into the ROM image.
With that done, it flips to the second ROM which together with the
cartridge mappings gives you a high 32K for kernel code, although it has
to be split using text1/text2 as we must stuff the exception vectors into
0xBFF0-0xBFFF - so double check the fuzix.map
Alan Cox [Thu, 27 Nov 2014 01:06:22 +0000 (01:06 +0000)]
dragon: 64K RAM not 96K
Alan Cox [Thu, 27 Nov 2014 01:06:05 +0000 (01:06 +0000)]
dragon: Build the rom images not just fuzix.bin
Alan Cox [Thu, 27 Nov 2014 01:05:28 +0000 (01:05 +0000)]
dragon: remove dead bits, add vt mapper function
Alan Cox [Thu, 27 Nov 2014 01:04:56 +0000 (01:04 +0000)]
dragon: correct config.h, turn on new vt features etc
Alan Cox [Thu, 27 Nov 2014 01:04:35 +0000 (01:04 +0000)]
dragon: do char mapping in the right spot
Alan Cox [Thu, 27 Nov 2014 01:04:02 +0000 (01:04 +0000)]
6809: add mulhi
We need this for load average computation
Alan Cox [Thu, 27 Nov 2014 01:03:41 +0000 (01:03 +0000)]
decbdragon: Turn the DECB stream into a set of ROM images
Alan Cox [Thu, 27 Nov 2014 01:01:50 +0000 (01:01 +0000)]
vt: minor fixes and a temporary hack
We have overlapped input/output so should use memmove - just we don't yet
have a memmove in all our support code - botch it for now
Add support to start on a different line (eg below boot rom info)
Allow a mapping function for simple mode (eg for Petscii and for 6809
boxes with the 6847)
Alan Cox [Tue, 25 Nov 2014 22:42:30 +0000 (22:42 +0000)]
z80pack: fix silly unfixed comment from early 48K setup
Alan Cox [Tue, 25 Nov 2014 22:39:54 +0000 (22:39 +0000)]
z80pack32: Prototyping work to support 32K + 32K fixed better
Initial test work to see what is needed to handle machines that have a 32K
chunk you can page and a fixed 32K chunk (MTX512, N8VEM v2, MicroBee etc)
Buildable prototype but needs work doing on the crt0.s/binman setup to cope
with binaries containing a big hole in the middle.
Alan Cox [Tue, 25 Nov 2014 18:01:00 +0000 (18:01 +0000)]
binman: sanity check data area, fix end reporting
Alan Cox [Tue, 25 Nov 2014 18:00:41 +0000 (18:00 +0000)]
socz80: update to new _discard
Alan Cox [Tue, 25 Nov 2014 17:59:45 +0000 (17:59 +0000)]
pcw8256: note zero requirement
Alan Cox [Tue, 25 Nov 2014 17:59:19 +0000 (17:59 +0000)]
z80pack-lite: update to new _discard
Alan Cox [Tue, 25 Nov 2014 17:58:56 +0000 (17:58 +0000)]
pcw8256: update to new _discard
Alan Cox [Tue, 25 Nov 2014 17:58:07 +0000 (17:58 +0000)]
trs80: update to new _discard
Alan Cox [Tue, 25 Nov 2014 17:57:50 +0000 (17:57 +0000)]
nc100: update to new _discard
Alan Cox [Tue, 25 Nov 2014 17:57:26 +0000 (17:57 +0000)]
msx2: update to new _discard logic
Alan Cox [Tue, 25 Nov 2014 17:56:53 +0000 (17:56 +0000)]
msx1: update to new discard
Alan Cox [Tue, 25 Nov 2014 15:55:37 +0000 (15:55 +0000)]
kdata,start: undo the bufpool hack
The strings should now end up in _DISCARD without hackery
Alan Cox [Tue, 25 Nov 2014 15:55:18 +0000 (15:55 +0000)]
z80pack: link _DISCARD at 0xE000
Alan Cox [Tue, 25 Nov 2014 15:54:39 +0000 (15:54 +0000)]
z80pack: Keep discard separate
We can now discard the _DISCARD segment - yay, another 1K
Alan Cox [Tue, 25 Nov 2014 15:53:53 +0000 (15:53 +0000)]
binman: Pack the _DISCARD section so it can be relocated and discarded
This means platforms need to adjust their crt0.s as per the following
z80pack commits
Alan Cox [Tue, 25 Nov 2014 15:53:05 +0000 (15:53 +0000)]
Makefile: put string constants from the startup into discard as well
This lets us undo the buffer hack in a bit
Alan Cox [Tue, 25 Nov 2014 15:52:44 +0000 (15:52 +0000)]
z80pack: remove facepalm
Alan Cox [Tue, 25 Nov 2014 11:00:42 +0000 (11:00 +0000)]
process: Add loadav calculator.
Needs to be exposed nicely to userspace yet.
Also remove a dead FIXME in the process code
Alan Cox [Tue, 25 Nov 2014 00:34:34 +0000 (00:34 +0000)]
kn_open: shave off 30 bytes
Alan Cox [Tue, 25 Nov 2014 00:31:09 +0000 (00:31 +0000)]
i_alloc: shave another 60 bytes off
Alan Cox [Mon, 24 Nov 2014 23:57:10 +0000 (23:57 +0000)]
z80pack: use end of bounce buffer for swap stack
It's never doing both at once
EtchedPixels [Mon, 24 Nov 2014 19:14:33 +0000 (19:14 +0000)]
Merge pull request #19 from atsidaev/clean-apps
FUZIX executables generation
Alexander Tsidaev [Mon, 24 Nov 2014 17:15:12 +0000 (12:15 -0500)]
apps: add binman support and produce FUZIX executables
Alexander Tsidaev [Mon, 24 Nov 2014 16:21:42 +0000 (11:21 -0500)]
library: line endings fix, file modes fix.
salex [Mon, 24 Nov 2014 16:07:10 +0000 (11:07 -0500)]
Fixed library and apps maker.
EtchedPixels [Mon, 24 Nov 2014 08:34:59 +0000 (08:34 +0000)]
Merge pull request #18 from atsidaev/clean-
24112014
zx128 multitasking support
Alexander Tsidaev [Sun, 23 Nov 2014 21:51:05 +0000 (02:51 +0500)]
zx128: custom banking added
Alan Cox [Sun, 23 Nov 2014 22:43:57 +0000 (22:43 +0000)]
z80pack: kill dead code
Alan Cox [Sun, 23 Nov 2014 22:36:10 +0000 (22:36 +0000)]
execve: per CPU magic, also allow for different program base
Use different magic numbers for different CPU types. Note that we need to
pass some kind of base info and check it in future (or support relocatable
binaries ?)
As noted by Atsidaev our handling of some of this was rather confused. We
now pass the size (top - PROGBASE) to the allocator. This sort of assumes for
6502 we'll set 0x0200 (or higher) entry and 0x0000 base and something similar
for 6809.
zx128 will still need a custom banking module eventually. Once someone
beats SDCC into banking the kernel code that can mostly live in 2 (or 3)
16K banks in an interface 2 cartridge with banking support then it can
use 0x8000-0xBFFF and lazy memcpy it from another page (or even exchange
two pages) on a taskswitch between two different 32K apps.
See: http://www.fruitcake.plus.com/Sinclair/Interface2/Cartridges/Interface2_RC_Custom.htm#SoftwarePaging
Alan Cox [Sun, 23 Nov 2014 22:17:56 +0000 (22:17 +0000)]
z80pack: update Makefiles to have correct rules for dev/../.. code
Alexander Tsidaev [Sun, 23 Nov 2014 17:23:22 +0000 (22:23 +0500)]
zx128: vt keyboard scan bug fixed
Alexander Tsidaev [Sun, 23 Nov 2014 12:12:57 +0000 (17:12 +0500)]
zx128: fd_bankcmd eliminated at last
Alexander Tsidaev [Sat, 22 Nov 2014 22:50:08 +0000 (03:50 +0500)]
zx128: multitasking support
Alan Cox [Sun, 23 Nov 2014 20:07:36 +0000 (20:07 +0000)]
z80pack: add shared devlpr
Alan Cox [Sun, 23 Nov 2014 20:06:53 +0000 (20:06 +0000)]
z80pack: share the lpr driver code
Alan Cox [Sun, 23 Nov 2014 13:56:52 +0000 (13:56 +0000)]
z80pack: clean up common devtty between versions
Alan Cox [Sun, 23 Nov 2014 00:54:07 +0000 (00:54 +0000)]
z80pack-lite: link _discard suitably
Alan Cox [Sun, 23 Nov 2014 00:51:15 +0000 (00:51 +0000)]
z80pack-lite: get it to build again
Not yet tested
Alan Cox [Sun, 23 Nov 2014 00:40:58 +0000 (00:40 +0000)]
micropack: use the shared devfd
Alan Cox [Sun, 23 Nov 2014 00:40:27 +0000 (00:40 +0000)]
z80pack-lite: bring into alignment with modernity
Alan Cox [Sun, 23 Nov 2014 00:40:12 +0000 (00:40 +0000)]
z80pack-lite: clean up old code
Alan Cox [Sun, 23 Nov 2014 00:39:56 +0000 (00:39 +0000)]
z80pack-lite: bring up to date a bit more
Alan Cox [Sun, 23 Nov 2014 00:39:23 +0000 (00:39 +0000)]
z80pack-lite: clean up config, use common devfd
Alan Cox [Sun, 23 Nov 2014 00:38:25 +0000 (00:38 +0000)]
z80pack: devfd updates
Alan Cox [Sun, 23 Nov 2014 00:07:38 +0000 (00:07 +0000)]
z80pack: Move devfd somewhere common
Begin folding all the common z80pack bits together
Alan Cox [Sat, 22 Nov 2014 22:55:07 +0000 (22:55 +0000)]
Makefile: remove comment - staying with uzi.lnk ordering for now
Alan Cox [Sat, 22 Nov 2014 22:54:56 +0000 (22:54 +0000)]
pcw8256: fix ramtop definition
Alan Cox [Sat, 22 Nov 2014 22:50:21 +0000 (22:50 +0000)]
pcw8256: fix swap defines
Alan Cox [Sat, 22 Nov 2014 22:48:15 +0000 (22:48 +0000)]
pcw8256: Various fixes
Make sure we link the commonmem.s first
Use the standard commonmem
Move the written parts of common clear of the first 256 bytes (so swap can
work)
Alan Cox [Sat, 22 Nov 2014 22:47:31 +0000 (22:47 +0000)]
commonmem: switch some platforms to using the new .include
Alan Cox [Sat, 22 Nov 2014 22:46:30 +0000 (22:46 +0000)]
commonmem: add a standard Z80 commonmem to .include
Alan Cox [Sat, 22 Nov 2014 20:54:46 +0000 (20:54 +0000)]
z80pack: fix comment
Alan Cox [Sat, 22 Nov 2014 20:51:30 +0000 (20:51 +0000)]
vdp: Create a shared device area
We want this as there are MSX1 boxes with MSX2 memory mappers (or from our
viewpoint MSX2 boxes with MSX1 video). In addition it turns out that the VDP
used on the Memotech MTX series machines is basically the same beastie.
Alan Cox [Sat, 22 Nov 2014 00:48:18 +0000 (00:48 +0000)]
_open: fix static corruptor
We can block in a tty open, which if another open then occurs leaves
the staticfast "ino" corrupted. Save it in a temporary variable so that
for we still get almost all the benefit of staticfast here.
Alan Cox [Sat, 22 Nov 2014 00:43:16 +0000 (00:43 +0000)]
mm: remove fairly useless and non-portable optimisation hack
Far better to optimise usercopy functions if you need to
Alan Cox [Sat, 22 Nov 2014 00:12:34 +0000 (00:12 +0000)]
types: rework the types for the BASE/TOP configurations
This makes it a fair bit cleaner
Alan Cox [Fri, 21 Nov 2014 23:20:43 +0000 (23:20 +0000)]
nc100: Update to put platform _kernel_flag in common
Alan Cox [Fri, 21 Nov 2014 23:20:11 +0000 (23:20 +0000)]
nc100: Correct tty code
Update the nc100 specific tty code to match the new combined terminal structure
Alan Cox [Fri, 21 Nov 2014 15:06:36 +0000 (15:06 +0000)]
pagemap_realloc: This is the amount of memory neede relative to BASE not LOAD
Now we have a clear divide fix up the broken assumption
Alan Cox [Fri, 21 Nov 2014 15:06:11 +0000 (15:06 +0000)]
usermem: always trap NULL pointers
Low vectors are hard due to the cp/mn emulation
Alan Cox [Fri, 21 Nov 2014 15:05:04 +0000 (15:05 +0000)]
bank16/32k: compute common area allowance
We propogate the common into each high bank so must allow for it. Remove
the hardcoded 4K assumption as it's trivial to do so, and also socz80 at
least doesn't need 0xF000 to be the common base.
Alan Cox [Fri, 21 Nov 2014 15:03:32 +0000 (15:03 +0000)]
syscall_exec: Introduce the notion of both a base and a load address
Eg on Z80 our base is 0 but we load at 0x200. On 6502 our base and load
are going to be higher and the same, ditto probably 6809
Alan Cox [Fri, 21 Nov 2014 15:01:59 +0000 (15:01 +0000)]
devsys: note a Z80 assumption to fix
Alan Cox [Thu, 20 Nov 2014 23:38:01 +0000 (23:38 +0000)]
init: Fix environment handling
From: Will Sowerbutts
Alan Cox [Thu, 20 Nov 2014 23:36:59 +0000 (23:36 +0000)]
putenv: Fix NULL environment handling
From: Will Sowerbutts
Alan Cox [Thu, 20 Nov 2014 23:35:55 +0000 (23:35 +0000)]
ultoa: this one escaped the pruning
Noted by Will Sowerbutts
Alan Cox [Thu, 20 Nov 2014 23:34:26 +0000 (23:34 +0000)]
crt0: Correct environment and argument parsing
From: Will Sowerbutts
kernel sets up the stack differently: argc, argv, environ[]
Alan Cox [Tue, 18 Nov 2014 21:13:01 +0000 (21:13 +0000)]
unbanked: Update comments
Will pointed out the comments in unbanked about Z180 were bogus, and indeed
were also out of date.
Also turns out we can't have the kernel at physical 0 and banks for user
copy and for udata on the Z180 as the N8VEM-4 and probably others have ROM
at physical 0
Alan Cox [Tue, 18 Nov 2014 20:37:10 +0000 (20:37 +0000)]
bank32: make passive provision for awkward boxes with low 32K switching
This allows you to define them as a 32K paged system and use the provided
swap and page hooks, plus your switch functions to copy blocks between the
spare parts of the high 32K and the pages they are stashed in.
This means that with a typical usage model of a single large app performance
will basically be as good as a sensible layout, and only if you have two
larger apps actively running at once will it degrade much.
This will be pretty much essential to cover the uBee and the N8VEM-2.
Alan Cox [Tue, 18 Nov 2014 11:55:33 +0000 (11:55 +0000)]
pcw8256: Continued work
This fixes parts of the floppy logic and moves kernel_flag as per core
changes.
We now load the superblock correctly but things to castors up when we start
to load init. We appear to be asking for the right track/sector but more
debugging is needed.
Alan Cox [Tue, 18 Nov 2014 11:54:24 +0000 (11:54 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX
Merge with patches applied via github
Alan Cox [Tue, 18 Nov 2014 11:53:08 +0000 (11:53 +0000)]
From: William R Sowerbutts
Correct the inode type in a dirent.
We accidentally kept the 32bit type from ELKS
EtchedPixels [Tue, 18 Nov 2014 11:28:51 +0000 (11:28 +0000)]
Merge pull request #14 from atsidaev/ucp
ucp: chmod parameters order fixed
Alexander Tsidaev [Tue, 18 Nov 2014 10:46:37 +0000 (15:46 +0500)]
ucp: chmod parameters order fixed
Alan Cox [Mon, 17 Nov 2014 21:39:28 +0000 (21:39 +0000)]
lowlevel-z80: remove accidentally commited debugging code
Alan Cox [Sun, 16 Nov 2014 16:30:12 +0000 (16:30 +0000)]
dragon: continue fleshing out
At this point it's a fairly complete build minus I/O devices but with some
guesswork on how we will deal with irq and syscall handling given the odd
memory mappings.
It does at least suggest that we can put it in cartridge + single task in
memory mode.
Alan Cox [Sun, 16 Nov 2014 16:20:58 +0000 (16:20 +0000)]
lowlevel-z80: di/ei handling
Handle both di/ei restore cases don't assume we are just stacking disables
Alan Cox [Sun, 16 Nov 2014 16:18:48 +0000 (16:18 +0000)]
6502: Start fleshing out how the port would work
Very incomplete at this point
Alan Cox [Sun, 16 Nov 2014 16:18:07 +0000 (16:18 +0000)]
execve: remove some debug noise
Alan Cox [Sat, 15 Nov 2014 22:38:40 +0000 (22:38 +0000)]
6502test: flesh out a little of the 6502 init paths
Alan Cox [Sat, 15 Nov 2014 21:14:57 +0000 (21:14 +0000)]
binman: memcpy the initialized data over
This accidentally got removed when I stripped it down from the full
featured kernel version.
Alan Cox [Sat, 15 Nov 2014 13:59:44 +0000 (13:59 +0000)]
process: kernel flag has moved to common
Alan Cox [Sat, 15 Nov 2014 13:57:38 +0000 (13:57 +0000)]
z80pack: put the kernel flag in common
As this is checked with the kernel not mapped it's important it lives somewhere
more suitable
Alan Cox [Sat, 15 Nov 2014 13:57:04 +0000 (13:57 +0000)]
usermem-z80: return 0
Alan Cox [Sat, 15 Nov 2014 13:56:39 +0000 (13:56 +0000)]
usermem: fix error handling
Alan Cox [Sat, 15 Nov 2014 13:55:38 +0000 (13:55 +0000)]
z80pack, tricks: update bankfork
We now use all but 4K for base memory so we may need to copy more space.
Without this fix programs with large or no chmem crashes in fork()
Alan Cox [Fri, 14 Nov 2014 18:30:12 +0000 (18:30 +0000)]
z80pack: Make the bootblock in the Makefile
Update README
Alan Cox [Fri, 14 Nov 2014 18:09:48 +0000 (18:09 +0000)]
start: fix screw up in tty changes
Alan Cox [Fri, 14 Nov 2014 16:17:03 +0000 (16:17 +0000)]
binman: Clean crap out of tools binman version
Alan Cox [Thu, 13 Nov 2014 21:53:16 +0000 (21:53 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Thu, 13 Nov 2014 21:52:04 +0000 (21:52 +0000)]
Makefile: allow for banking tests
No I've no idea how I'd do the banking functions either yet, but it proves
we can build most of it (still busted for device I/O calls)