FUZIX.git
9 years agoz80pack: use end of bounce buffer for swap stack
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

9 years agoMerge pull request #19 from atsidaev/clean-apps
EtchedPixels [Mon, 24 Nov 2014 19:14:33 +0000 (19:14 +0000)]
Merge pull request #19 from atsidaev/clean-apps

FUZIX executables generation

9 years agoapps: add binman support and produce FUZIX executables
Alexander Tsidaev [Mon, 24 Nov 2014 17:15:12 +0000 (12:15 -0500)]
apps: add binman support and produce FUZIX executables

9 years agolibrary: line endings fix, file modes fix.
Alexander Tsidaev [Mon, 24 Nov 2014 16:21:42 +0000 (11:21 -0500)]
library: line endings fix, file modes fix.

9 years agoFixed library and apps maker.
salex [Mon, 24 Nov 2014 16:07:10 +0000 (11:07 -0500)]
Fixed library and apps maker.

9 years agoMerge pull request #18 from atsidaev/clean-24112014
EtchedPixels [Mon, 24 Nov 2014 08:34:59 +0000 (08:34 +0000)]
Merge pull request #18 from atsidaev/clean-24112014

zx128 multitasking support

9 years agozx128: custom banking added
Alexander Tsidaev [Sun, 23 Nov 2014 21:51:05 +0000 (02:51 +0500)]
zx128: custom banking added

9 years agoz80pack: kill dead code
Alan Cox [Sun, 23 Nov 2014 22:43:57 +0000 (22:43 +0000)]
z80pack: kill dead code

9 years agoexecve: per CPU magic, also allow for different program base
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

9 years agoz80pack: update Makefiles to have correct rules for dev/../.. code
Alan Cox [Sun, 23 Nov 2014 22:17:56 +0000 (22:17 +0000)]
z80pack: update Makefiles to have correct rules for dev/../.. code

9 years agozx128: vt keyboard scan bug fixed
Alexander Tsidaev [Sun, 23 Nov 2014 17:23:22 +0000 (22:23 +0500)]
zx128: vt keyboard scan bug fixed

9 years agozx128: fd_bankcmd eliminated at last
Alexander Tsidaev [Sun, 23 Nov 2014 12:12:57 +0000 (17:12 +0500)]
zx128: fd_bankcmd eliminated at last

9 years agozx128: multitasking support
Alexander Tsidaev [Sat, 22 Nov 2014 22:50:08 +0000 (03:50 +0500)]
zx128: multitasking support

9 years agoz80pack: add shared devlpr
Alan Cox [Sun, 23 Nov 2014 20:07:36 +0000 (20:07 +0000)]
z80pack: add shared devlpr

9 years agoz80pack: share the lpr driver code
Alan Cox [Sun, 23 Nov 2014 20:06:53 +0000 (20:06 +0000)]
z80pack: share the lpr driver code

9 years agoz80pack: clean up common devtty between versions
Alan Cox [Sun, 23 Nov 2014 13:56:52 +0000 (13:56 +0000)]
z80pack: clean up common devtty between versions

9 years agoz80pack-lite: link _discard suitably
Alan Cox [Sun, 23 Nov 2014 00:54:07 +0000 (00:54 +0000)]
z80pack-lite: link _discard suitably

9 years agoz80pack-lite: get it to build again
Alan Cox [Sun, 23 Nov 2014 00:51:15 +0000 (00:51 +0000)]
z80pack-lite: get it to build again

Not yet tested

9 years agomicropack: use the shared devfd
Alan Cox [Sun, 23 Nov 2014 00:40:58 +0000 (00:40 +0000)]
micropack: use the shared devfd

9 years agoz80pack-lite: bring into alignment with modernity
Alan Cox [Sun, 23 Nov 2014 00:40:27 +0000 (00:40 +0000)]
z80pack-lite: bring into alignment with modernity

9 years agoz80pack-lite: clean up old code
Alan Cox [Sun, 23 Nov 2014 00:40:12 +0000 (00:40 +0000)]
z80pack-lite: clean up old code

9 years agoz80pack-lite: bring up to date a bit more
Alan Cox [Sun, 23 Nov 2014 00:39:56 +0000 (00:39 +0000)]
z80pack-lite: bring up to date a bit more

9 years agoz80pack-lite: clean up config, use common devfd
Alan Cox [Sun, 23 Nov 2014 00:39:23 +0000 (00:39 +0000)]
z80pack-lite: clean up config, use common devfd

9 years agoz80pack: devfd updates
Alan Cox [Sun, 23 Nov 2014 00:38:25 +0000 (00:38 +0000)]
z80pack: devfd updates

9 years agoz80pack: Move devfd somewhere common
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

9 years agoMakefile: remove comment - staying with uzi.lnk ordering for now
Alan Cox [Sat, 22 Nov 2014 22:55:07 +0000 (22:55 +0000)]
Makefile: remove comment - staying with uzi.lnk ordering for now

9 years agopcw8256: fix ramtop definition
Alan Cox [Sat, 22 Nov 2014 22:54:56 +0000 (22:54 +0000)]
pcw8256: fix ramtop definition

9 years agopcw8256: fix swap defines
Alan Cox [Sat, 22 Nov 2014 22:50:21 +0000 (22:50 +0000)]
pcw8256: fix swap defines

9 years agopcw8256: Various fixes
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)

9 years agocommonmem: switch some platforms to using the new .include
Alan Cox [Sat, 22 Nov 2014 22:47:31 +0000 (22:47 +0000)]
commonmem: switch some platforms to using the new .include

9 years agocommonmem: add a standard Z80 commonmem to .include
Alan Cox [Sat, 22 Nov 2014 22:46:30 +0000 (22:46 +0000)]
commonmem: add a standard Z80 commonmem to .include

9 years agoz80pack: fix comment
Alan Cox [Sat, 22 Nov 2014 20:54:46 +0000 (20:54 +0000)]
z80pack: fix comment

9 years agovdp: Create a shared device area
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.

9 years ago_open: fix static corruptor
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.

9 years agomm: remove fairly useless and non-portable optimisation hack
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

9 years agotypes: rework the types for the BASE/TOP configurations
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

9 years agonc100: Update to put platform _kernel_flag in common
Alan Cox [Fri, 21 Nov 2014 23:20:43 +0000 (23:20 +0000)]
nc100: Update to put platform _kernel_flag in common

9 years agonc100: Correct tty code
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

9 years agopagemap_realloc: This is the amount of memory neede relative to BASE not LOAD
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

9 years agousermem: always trap NULL pointers
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

9 years agobank16/32k: compute common area allowance
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.

9 years agosyscall_exec: Introduce the notion of both a base and a load address
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

9 years agodevsys: note a Z80 assumption to fix
Alan Cox [Fri, 21 Nov 2014 15:01:59 +0000 (15:01 +0000)]
devsys: note a Z80 assumption to fix

9 years agoinit: Fix environment handling
Alan Cox [Thu, 20 Nov 2014 23:38:01 +0000 (23:38 +0000)]
init: Fix environment handling

From: Will Sowerbutts

9 years agoputenv: Fix NULL environment handling
Alan Cox [Thu, 20 Nov 2014 23:36:59 +0000 (23:36 +0000)]
putenv: Fix NULL environment handling

From: Will Sowerbutts

9 years agoultoa: this one escaped the pruning
Alan Cox [Thu, 20 Nov 2014 23:35:55 +0000 (23:35 +0000)]
ultoa: this one escaped the pruning

Noted by Will Sowerbutts

9 years agocrt0: Correct environment and argument parsing
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[]

9 years agounbanked: Update comments
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

9 years agobank32: make passive provision for awkward boxes with low 32K switching
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.

9 years agopcw8256: Continued work
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.

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
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

9 years agoFrom: William R Sowerbutts
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

9 years agoMerge pull request #14 from atsidaev/ucp
EtchedPixels [Tue, 18 Nov 2014 11:28:51 +0000 (11:28 +0000)]
Merge pull request #14 from atsidaev/ucp

ucp: chmod parameters order fixed

9 years agoucp: chmod parameters order fixed
Alexander Tsidaev [Tue, 18 Nov 2014 10:46:37 +0000 (15:46 +0500)]
ucp: chmod parameters order fixed

9 years agolowlevel-z80: remove accidentally commited debugging code
Alan Cox [Mon, 17 Nov 2014 21:39:28 +0000 (21:39 +0000)]
lowlevel-z80: remove accidentally commited debugging code

9 years agodragon: continue fleshing out
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.

9 years agolowlevel-z80: di/ei handling
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

9 years ago6502: Start fleshing out how the port would work
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

9 years agoexecve: remove some debug noise
Alan Cox [Sun, 16 Nov 2014 16:18:07 +0000 (16:18 +0000)]
execve: remove some debug noise

9 years ago6502test: flesh out a little of the 6502 init paths
Alan Cox [Sat, 15 Nov 2014 22:38:40 +0000 (22:38 +0000)]
6502test: flesh out a little of the 6502 init paths

9 years agobinman: memcpy the initialized data over
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.

9 years agoprocess: kernel flag has moved to common
Alan Cox [Sat, 15 Nov 2014 13:59:44 +0000 (13:59 +0000)]
process: kernel flag has moved to common

9 years agoz80pack: put the kernel flag in 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

9 years agousermem-z80: return 0
Alan Cox [Sat, 15 Nov 2014 13:57:04 +0000 (13:57 +0000)]
usermem-z80: return 0

9 years agousermem: fix error handling
Alan Cox [Sat, 15 Nov 2014 13:56:39 +0000 (13:56 +0000)]
usermem: fix error handling

9 years agoz80pack, tricks: update bankfork
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()

9 years agoz80pack: Make the bootblock in the Makefile
Alan Cox [Fri, 14 Nov 2014 18:30:12 +0000 (18:30 +0000)]
z80pack: Make the bootblock in the Makefile

Update README

9 years agostart: fix screw up in tty changes
Alan Cox [Fri, 14 Nov 2014 18:09:48 +0000 (18:09 +0000)]
start: fix screw up in tty changes

9 years agobinman: Clean crap out of tools binman version
Alan Cox [Fri, 14 Nov 2014 16:17:03 +0000 (16:17 +0000)]
binman: Clean crap out of tools binman version

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Thu, 13 Nov 2014 21:53:16 +0000 (21:53 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMakefile: allow for banking tests
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)

9 years agodragon,devtty: mask chars for braindead video
Alan Cox [Thu, 13 Nov 2014 21:51:43 +0000 (21:51 +0000)]
dragon,devtty: mask chars for braindead video

9 years agoMerge pull request #13 from erkinalp/master
EtchedPixels [Wed, 12 Nov 2014 21:24:20 +0000 (21:24 +0000)]
Merge pull request #13 from erkinalp/master

Removed implicit ints in mkfs.c

9 years agoRemoved implicit ints in mkfs.c
erkinalp [Wed, 12 Nov 2014 18:55:20 +0000 (20:55 +0200)]
Removed implicit ints in mkfs.c

Some functions have return type int implicitly, which is forbidden by C99. This commit corrects them.

9 years agotty: Group objects together so the compiler can use one pointer register
Alan Cox [Wed, 12 Nov 2014 00:56:50 +0000 (00:56 +0000)]
tty: Group objects together so the compiler can use one pointer register

Takes 100 bytes off tty_inproc alone

9 years ago6809: bank names should be strings
Alan Cox [Wed, 12 Nov 2014 00:30:01 +0000 (00:30 +0000)]
6809: bank names should be strings

9 years agobanking: lay the groundwork
Alan Cox [Tue, 11 Nov 2014 23:30:02 +0000 (23:30 +0000)]
banking: lay the groundwork

Unfortunately the current m6809 gcc build banking support is broken and
doesn't remember to add the bank names with the .db for the bank so it fails
to assemble.

Uglies:
- We put all syscalls in the same bank to avoid having to have a 'far' pointer
  form for the syscall table
- We don't do this for devices, so will need to rig up some far pointer
  hackery for this

9 years agosyscall_other: Fix bracketing
Alan Cox [Tue, 11 Nov 2014 23:25:24 +0000 (23:25 +0000)]
syscall_other: Fix bracketing

9 years agoidump: We don't want the debugging in discard !
Alan Cox [Tue, 11 Nov 2014 23:06:50 +0000 (23:06 +0000)]
idump: We don't want the debugging in discard !

9 years agodragon: Initial bits towards a Dragon64 port of sorts
Alan Cox [Tue, 11 Nov 2014 21:44:45 +0000 (21:44 +0000)]
dragon: Initial bits towards a Dragon64 port of sorts

That's if you count replacing the boot ROMs as a "port"

9 years agom6809test: Switch t using lwlink directly and fix some oddments
Alan Cox [Tue, 11 Nov 2014 21:42:10 +0000 (21:42 +0000)]
m6809test: Switch t using lwlink directly and fix some oddments

This allows us to actually control memory the way we need

9 years agoswap: correct sign of pointers
Alan Cox [Tue, 11 Nov 2014 21:41:44 +0000 (21:41 +0000)]
swap: correct sign of pointers

9 years agosingle: fix types
Alan Cox [Tue, 11 Nov 2014 21:41:27 +0000 (21:41 +0000)]
single: fix types

9 years ago6502: unbitrot
Alan Cox [Tue, 11 Nov 2014 12:37:49 +0000 (12:37 +0000)]
6502: unbitrot

9 years agocpu: push time_t into CPU dependencies
Alan Cox [Tue, 11 Nov 2014 12:37:20 +0000 (12:37 +0000)]
cpu: push time_t into CPU dependencies

9 years agousermem: const v const pointer compares
Alan Cox [Tue, 11 Nov 2014 12:36:44 +0000 (12:36 +0000)]
usermem: const v const pointer compares

Remove warnings (cc65 is overly pedantic)

9 years agovt: Don't assume char is signed (next sdcc will change this, 6502 isnt)
Alan Cox [Tue, 11 Nov 2014 12:36:01 +0000 (12:36 +0000)]
vt: Don't assume char is signed (next sdcc will change this, 6502 isnt)

9 years agoprocess: fix ACCT build
Alan Cox [Tue, 11 Nov 2014 12:35:49 +0000 (12:35 +0000)]
process: fix ACCT build

9 years agosyscall_exec: use staticfast to shave 0.5K off execve()
Alan Cox [Tue, 11 Nov 2014 12:20:41 +0000 (12:20 +0000)]
syscall_exec: use staticfast to shave 0.5K off execve()

9 years agofuzix: break out execve()
Alan Cox [Tue, 11 Nov 2014 11:53:09 +0000 (11:53 +0000)]
fuzix: break out execve()

We need to split this into pieces and also allow some of it to be
cpu specific

9 years agobootrom: Some corrections from Manuel Pazos
Alan Cox [Mon, 10 Nov 2014 21:53:08 +0000 (21:53 +0000)]
bootrom: Some corrections from Manuel Pazos

Plus some tidying of them to match the sdcc assembler

Still doesn't work but its hopefully closer now

9 years agoMerge pull request #12 from atsidaev/zx128-clean
EtchedPixels [Mon, 10 Nov 2014 14:33:33 +0000 (14:33 +0000)]
Merge pull request #12 from atsidaev/zx128-clean

zx128: uzi.lnk, keyboard support and fixes

9 years agozx128: uzi.lnk added
Alexander Tsidaev [Mon, 10 Nov 2014 13:24:05 +0000 (18:24 +0500)]
zx128: uzi.lnk added

9 years agozx128: keyboard support for tty
Alexander Tsidaev [Mon, 10 Nov 2014 13:40:08 +0000 (18:40 +0500)]
zx128: keyboard support for tty

9 years agozx128: disable switchin/switchout since they are not implemented and cause a di:halt
Alexander Tsidaev [Sun, 9 Nov 2014 20:24:56 +0000 (01:24 +0500)]
zx128: disable switchin/switchout since they are not implemented and cause a di:halt

9 years agozx128: scroll functions fix
Alexander Tsidaev [Sun, 9 Nov 2014 20:23:49 +0000 (01:23 +0500)]
zx128: scroll functions fix

9 years ago6809: unbitrot versus changes we've made elsewhere
Alan Cox [Mon, 10 Nov 2014 01:00:50 +0000 (01:00 +0000)]
6809: unbitrot versus changes we've made elsewhere

Still not a "real" port, but it compiles again

9 years agofilesys: fix gcc warn/errors
Alan Cox [Mon, 10 Nov 2014 01:00:37 +0000 (01:00 +0000)]
filesys: fix gcc warn/errors

9 years agotty: fix bracketing
Alan Cox [Mon, 10 Nov 2014 01:00:23 +0000 (01:00 +0000)]
tty: fix bracketing

9 years agoMerge pull request #11 from atsidaev/zx128-clean
EtchedPixels [Sun, 9 Nov 2014 11:23:58 +0000 (11:23 +0000)]
Merge pull request #11 from atsidaev/zx128-clean

zx128: Initial ZX Spectrum 128 support