FUZIX.git
9 years agomsx2: generate 8k banked ascii rom
geijoenr [Fri, 20 Feb 2015 20:44:11 +0000 (20:44 +0000)]
msx2: generate 8k banked ascii rom

Switching to a banked rom simplifies the bootstrap, allows us to
discard it and also opens the possibility of appending a romfs
after the kernel

9 years agoplatform: standardise the offset checks for raw, and use BLKMASK
Alan Cox [Sat, 21 Feb 2015 00:34:17 +0000 (00:34 +0000)]
platform: standardise the offset checks for raw, and use BLKMASK

9 years agoinode: use BLKOFF
Alan Cox [Sat, 21 Feb 2015 00:32:38 +0000 (00:32 +0000)]
inode: use BLKOFF

This saves a bit of memory

9 years agofilesys: use BLKOFF
Alan Cox [Sat, 21 Feb 2015 00:32:22 +0000 (00:32 +0000)]
filesys: use BLKOFF

9 years agokernel: Add a definition for BLKOFF(x) which does the right casting
Alan Cox [Sat, 21 Feb 2015 00:31:09 +0000 (00:31 +0000)]
kernel: Add a definition for BLKOFF(x) which does the right casting

This avoids promotion to long and ugly code coming out of the Z80 compiler
in particular (and excessive code on 6502).

9 years agoinode: use psleep_flags helper
Alan Cox [Sat, 21 Feb 2015 00:02:05 +0000 (00:02 +0000)]
inode: use psleep_flags helper

In doing so also corrects sleep behaviour

9 years agoinode: Fix bug in direct I/O with holes
Alan Cox [Fri, 20 Feb 2015 23:55:07 +0000 (23:55 +0000)]
inode: Fix bug in direct I/O with holes

9 years agoREADME: update
Alan Cox [Fri, 20 Feb 2015 23:50:26 +0000 (23:50 +0000)]
README: update

9 years agodevio: sync before we flush
Alan Cox [Fri, 20 Feb 2015 22:27:37 +0000 (22:27 +0000)]
devio: sync before we flush

We should sync just this device and invalidate in the close but this is a start

9 years agofilesys: use inline for baddev
Alan Cox [Fri, 20 Feb 2015 22:24:56 +0000 (22:24 +0000)]
filesys: use inline for baddev

Saves us 0x40 bytes or so

9 years agoreadonly: Initial pieces for read-only mounts
Alan Cox [Fri, 20 Feb 2015 20:45:25 +0000 (20:45 +0000)]
readonly: Initial pieces for read-only mounts

9 years agotrs80: note you need -model 4p
Alan Cox [Fri, 20 Feb 2015 20:43:12 +0000 (20:43 +0000)]
trs80: note you need -model 4p

Small but important detail

9 years agobanking: fix panic uses
Alan Cox [Fri, 20 Feb 2015 20:39:45 +0000 (20:39 +0000)]
banking: fix panic uses

9 years agobankfixed: fix panic use
Alan Cox [Fri, 20 Feb 2015 20:38:47 +0000 (20:38 +0000)]
bankfixed: fix panic use

9 years agosimple: panic on corrupted swap
Alan Cox [Thu, 19 Feb 2015 23:22:10 +0000 (23:22 +0000)]
simple: panic on corrupted swap

9 years agobankfixed: adopt panic behaviour of other map types on swap bug
Alan Cox [Thu, 19 Feb 2015 23:20:53 +0000 (23:20 +0000)]
bankfixed: adopt panic behaviour of other map types on swap bug

9 years agobank32k: add reminder about stack
Alan Cox [Thu, 19 Feb 2015 23:20:35 +0000 (23:20 +0000)]
bank32k: add reminder about stack

9 years agobank16k_low: first cut at swap
Alan Cox [Thu, 19 Feb 2015 23:15:13 +0000 (23:15 +0000)]
bank16k_low: first cut at swap

There are a couple of 6502 crawly horrors around the stack left to resolve!

9 years agobank16k: first pass swap logic
Alan Cox [Thu, 19 Feb 2015 23:05:58 +0000 (23:05 +0000)]
bank16k: first pass swap logic

Do the swap in four requests so that each I/O is one mapping in memory space
and the drivers can stay sane. Right now swap passes the process ptr and
that should probably change to the page number (or for the simpler cases
the bank is the same thing).

9 years agosimple: swap policy
Alan Cox [Thu, 19 Feb 2015 23:05:07 +0000 (23:05 +0000)]
simple: swap policy

Nice and easy, no common memory magic, no splitting buffers, it's either
mapped or its swapped

9 years agokernel.h: swapmap prototypes
Alan Cox [Thu, 19 Feb 2015 23:04:49 +0000 (23:04 +0000)]
kernel.h: swapmap prototypes

9 years agoswap, bankfixed: move the swapin/out methods to the memory manager
Alan Cox [Thu, 19 Feb 2015 22:49:47 +0000 (22:49 +0000)]
swap, bankfixed: move the swapin/out methods to the memory manager

9 years agozx128: kill stale swap defines
Alan Cox [Thu, 19 Feb 2015 22:43:52 +0000 (22:43 +0000)]
zx128: kill stale swap defines

9 years agoswap: Make various methods global ready for further movements
Alan Cox [Thu, 19 Feb 2015 22:43:26 +0000 (22:43 +0000)]
swap: Make various methods global ready for further movements

9 years agoswap: remove UDATA_BLOCKS and friends
Alan Cox [Thu, 19 Feb 2015 22:38:56 +0000 (22:38 +0000)]
swap: remove UDATA_BLOCKS and friends

Nothing uses them and we need a better interface for split up swap anyway.

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Thu, 19 Feb 2015 11:52:07 +0000 (11:52 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agofstomdv: turn an fs image into a microdrive cartridge
Alan Cox [Thu, 19 Feb 2015 11:51:44 +0000 (11:51 +0000)]
fstomdv: turn an fs image into a microdrive cartridge

9 years agoblankmdv: make a blank 'disk' microdrive
Alan Cox [Thu, 19 Feb 2015 11:51:17 +0000 (11:51 +0000)]
blankmdv: make a blank 'disk' microdrive

9 years agozx128: first bits of trying to build a betadisk driver
Alan Cox [Thu, 19 Feb 2015 11:35:25 +0000 (11:35 +0000)]
zx128: first bits of trying to build a betadisk driver

This is ugly stuff, we can only access it via the ROM and the ROM doesn't
contain the functionality we need.

9 years agozx128: update main for final memory mappings
Alan Cox [Thu, 19 Feb 2015 11:35:08 +0000 (11:35 +0000)]
zx128: update main for final memory mappings

9 years agozx128: further tricks.s updating
Alan Cox [Thu, 19 Feb 2015 11:34:44 +0000 (11:34 +0000)]
zx128: further tricks.s updating

This gets us closer to the point we can do userspace usefully

9 years agozx128: tidy up traps
Alan Cox [Thu, 19 Feb 2015 11:34:11 +0000 (11:34 +0000)]
zx128: tidy up traps

9 years agozx128: correct pagemap docs
Alan Cox [Thu, 19 Feb 2015 11:33:54 +0000 (11:33 +0000)]
zx128: correct pagemap docs

9 years agoMerge pull request #122 from willsowerbutts/devsdfix
EtchedPixels [Mon, 16 Feb 2015 13:21:08 +0000 (13:21 +0000)]
Merge pull request #122 from willsowerbutts/devsdfix

devsd: Fix for picky cards

9 years agodevsd: Fix for picky cards
Will Sowerbutts [Sun, 15 Feb 2015 22:20:57 +0000 (22:20 +0000)]
devsd: Fix for picky cards

9 years agozx128: update README
Alan Cox [Sun, 15 Feb 2015 22:30:57 +0000 (22:30 +0000)]
zx128: update README

9 years agozx128: real fd first, mdv gets its own slot
Alan Cox [Sun, 15 Feb 2015 22:27:34 +0000 (22:27 +0000)]
zx128: real fd first, mdv gets its own slot

9 years agozx128: fix bugs in the microdrive layer
Alan Cox [Sun, 15 Feb 2015 22:27:15 +0000 (22:27 +0000)]
zx128: fix bugs in the microdrive layer

9 years agozx128: leave a bit more space while experimenting
Alan Cox [Sun, 15 Feb 2015 22:26:53 +0000 (22:26 +0000)]
zx128: leave a bit more space while experimenting

9 years agozx128: Make a .z80 file when building
Alan Cox [Sun, 15 Feb 2015 22:26:29 +0000 (22:26 +0000)]
zx128: Make a .z80 file when building

9 years agozx128: add a .z80 maker from the image
Alan Cox [Sun, 15 Feb 2015 22:21:31 +0000 (22:21 +0000)]
zx128: add a .z80 maker from the image

This is easier to work with as we can set the machine type reliably

9 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sun, 15 Feb 2015 13:44:55 +0000 (13:44 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

9 years agoMerge pull request #120 from willsowerbutts/hoistcommon
EtchedPixels [Sun, 15 Feb 2015 13:11:50 +0000 (13:11 +0000)]
Merge pull request #120 from willsowerbutts/hoistcommon

Kernel: p112, n8vem-mark4: Push the base of common memory up to F800

9 years agoMerge pull request #119 from willsowerbutts/devsdfix
EtchedPixels [Sun, 15 Feb 2015 13:11:18 +0000 (13:11 +0000)]
Merge pull request #119 from willsowerbutts/devsdfix

devsd: Bug fix for SD standard capacity card identification

9 years agoKernel: p112, n8vem-mark4: Push the base of common memory up to F800
Will Sowerbutts [Tue, 3 Feb 2015 00:28:22 +0000 (00:28 +0000)]
Kernel: p112, n8vem-mark4: Push the base of common memory up to F800

When the kernel is mapped in, the memory at F000-F800 now belongs to the
current process.

9 years agodevsd: Bug fix for SD standard capacity card identification
Will Sowerbutts [Sun, 15 Feb 2015 12:04:24 +0000 (12:04 +0000)]
devsd: Bug fix for SD standard capacity card identification

9 years agoMerge pull request #117 from willsowerbutts/z180timer
EtchedPixels [Sun, 15 Feb 2015 00:51:29 +0000 (00:51 +0000)]
Merge pull request #117 from willsowerbutts/z180timer

Various minor changes

9 years agoMerge pull request #116 from geijoenr/master
EtchedPixels [Sun, 15 Feb 2015 00:49:32 +0000 (00:49 +0000)]
Merge pull request #116 from geijoenr/master

move keyboard matrices to discard

9 years agoucp: Set file times correctly
Will Sowerbutts [Sat, 14 Feb 2015 22:36:23 +0000 (22:36 +0000)]
ucp: Set file times correctly

9 years agomkfs, fsck: Flush stdout when prompting for input
Will Sowerbutts [Sat, 14 Feb 2015 22:11:20 +0000 (22:11 +0000)]
mkfs, fsck: Flush stdout when prompting for input

9 years agoz180: Timer interrupt rate is now defined by the platform
Will Sowerbutts [Sat, 14 Feb 2015 21:53:34 +0000 (21:53 +0000)]
z180: Timer interrupt rate is now defined by the platform

9 years agozx128: move initializer data into some of the hole we need for the betadisc
Alan Cox [Sat, 14 Feb 2015 17:11:59 +0000 (17:11 +0000)]
zx128: move initializer data into some of the hole we need for the betadisc

9 years agozx128: arrange the memory map with a hole for the 5C00-5D3A area
Alan Cox [Sat, 14 Feb 2015 17:02:55 +0000 (17:02 +0000)]
zx128: arrange the memory map with a hole for the 5C00-5D3A area

Some ROMs (eg the betadisk interface) combine an arrangement whereby the
I/O ports are only accessible from the ROM with a set of ROM routines that
blindly assume spectrum basic is present and wish to pee in the system
variables area.

Whether this will be sufficient or hacked ROMs will be needed its hard to
tell given that we also need interrupts to stay off while in the foreign
ROM (otherwise our IM2 code will blow up).

9 years agodisciple: sector wrap, notes on +D
Alan Cox [Sat, 14 Feb 2015 16:43:58 +0000 (16:43 +0000)]
disciple: sector wrap, notes on +D

9 years agozx128: Start filling out disciple floppy disc support
Alan Cox [Sat, 14 Feb 2015 16:24:56 +0000 (16:24 +0000)]
zx128: Start filling out disciple floppy disc support

9 years agomsx2: move keyboard matrices to discard
geijoenr [Sat, 14 Feb 2015 16:02:47 +0000 (16:02 +0000)]
msx2: move keyboard matrices to discard

9 years agoMerge pull request #115 from willsowerbutts/rootdevparse2
EtchedPixels [Sat, 14 Feb 2015 15:15:41 +0000 (15:15 +0000)]
Merge pull request #115 from willsowerbutts/rootdevparse2

Kernel: Generic boot device parsing method

9 years agomsx2: move some code to CODE2
geijoenr [Sat, 14 Feb 2015 15:15:17 +0000 (15:15 +0000)]
msx2: move some code to CODE2

to prevent overlapping of BOOT

9 years agoKernel: Generic boot device parsing method
Will Sowerbutts [Sat, 14 Feb 2015 14:22:43 +0000 (14:22 +0000)]
Kernel: Generic boot device parsing method

9 years agoMakefile: add more of the targets
Alan Cox [Fri, 13 Feb 2015 23:19:07 +0000 (23:19 +0000)]
Makefile: add more of the targets

(Not all build right now)

9 years agostart: tidy up the ifdefs for the boot parser
Alan Cox [Fri, 13 Feb 2015 23:15:06 +0000 (23:15 +0000)]
start: tidy up the ifdefs for the boot parser

9 years agopcw8256: fix warnings with sdcc 3.4.2
Alan Cox [Fri, 13 Feb 2015 23:14:44 +0000 (23:14 +0000)]
pcw8256: fix warnings with sdcc 3.4.2

9 years agoubee: fix devtty define
Alan Cox [Fri, 13 Feb 2015 23:14:29 +0000 (23:14 +0000)]
ubee: fix devtty define

9 years agopx4plus: clean up to current tree
Alan Cox [Fri, 13 Feb 2015 23:14:04 +0000 (23:14 +0000)]
px4plus: clean up to current tree

This isn't a functional port yet - more a sanity checker on sizes

9 years agomicropack: align with current builds
Alan Cox [Fri, 13 Feb 2015 23:06:32 +0000 (23:06 +0000)]
micropack: align with current builds

9 years agovt: don't assume devtty.h
Alan Cox [Fri, 13 Feb 2015 23:06:08 +0000 (23:06 +0000)]
vt: don't assume devtty.h

If we are turned on then its needed, if not then it may be absent

9 years agomsx2: add new discard.c
Alan Cox [Fri, 13 Feb 2015 22:50:41 +0000 (22:50 +0000)]
msx2: add new discard.c

9 years agomsx2: bring in line with discard changes
Alan Cox [Fri, 13 Feb 2015 22:46:43 +0000 (22:46 +0000)]
msx2: bring in line with discard changes

9 years agotres80: Bring in line with __DISCARD changes
Alan Cox [Fri, 13 Feb 2015 22:30:23 +0000 (22:30 +0000)]
tres80: Bring in line with __DISCARD changes

9 years agoz80pack: fix tty for new style writeready
Alan Cox [Fri, 13 Feb 2015 22:17:47 +0000 (22:17 +0000)]
z80pack: fix tty for new style writeready

9 years agoz80pack-lite: Fix build
Alan Cox [Fri, 13 Feb 2015 22:17:35 +0000 (22:17 +0000)]
z80pack-lite: Fix build

9 years agoz80pack: fix build
Alan Cox [Fri, 13 Feb 2015 22:13:03 +0000 (22:13 +0000)]
z80pack: fix build

9 years agoMerge pull request #114 from willsowerbutts/rootdevparse
EtchedPixels [Fri, 13 Feb 2015 22:01:51 +0000 (22:01 +0000)]
Merge pull request #114 from willsowerbutts/rootdevparse

Better root device name parsing

9 years agozx128: update README
Alan Cox [Fri, 13 Feb 2015 21:45:26 +0000 (21:45 +0000)]
zx128: update README

9 years agozx128: update the microdrive code
Alan Cox [Fri, 13 Feb 2015 21:34:51 +0000 (21:34 +0000)]
zx128: update the microdrive code

Move it to device 8 so we can put real floppy controllers at zero. This
is still read only, and still somewhat silly but who cares.

9 years agodevtty: fix bogus space
Alan Cox [Fri, 13 Feb 2015 21:11:31 +0000 (21:11 +0000)]
devtty: fix bogus space

9 years agozx128: turn on unikey so '£' works
Alan Cox [Fri, 13 Feb 2015 21:10:59 +0000 (21:10 +0000)]
zx128: turn on unikey so '£' works

9 years agozx128: sort out the keyboard driver
Alan Cox [Fri, 13 Feb 2015 21:10:24 +0000 (21:10 +0000)]
zx128: sort out the keyboard driver

This adds some of the missing keyboard symbols, arrow key handling etc and
also sorts out the inverted handling bug.

9 years agozx128: Fix stubs from common to do a bank restore
Alan Cox [Fri, 13 Feb 2015 21:09:50 +0000 (21:09 +0000)]
zx128: Fix stubs from common to do a bank restore

Turns out this is needed

9 years agoKernel Makefile: Fix typo
Will Sowerbutts [Fri, 13 Feb 2015 20:02:08 +0000 (20:02 +0000)]
Kernel Makefile: Fix typo

9 years agop112, n8vem-mark4: Provide boot device parsing method
Will Sowerbutts [Fri, 13 Feb 2015 20:49:33 +0000 (20:49 +0000)]
p112, n8vem-mark4: Provide boot device parsing method

9 years agoKernel: Allow platforms to provide boot device parsing method
Will Sowerbutts [Fri, 13 Feb 2015 20:44:37 +0000 (20:44 +0000)]
Kernel: Allow platforms to provide boot device parsing method

9 years agoinode.c: rest of the fix too
Alan Cox [Fri, 13 Feb 2015 19:54:06 +0000 (19:54 +0000)]
inode.c: rest of the fix too

9 years agoTODO: update
Alan Cox [Fri, 13 Feb 2015 18:20:22 +0000 (18:20 +0000)]
TODO: update

9 years agoinode: allow O_DIRECT reads building from Will's direct change
Alan Cox [Fri, 13 Feb 2015 18:17:27 +0000 (18:17 +0000)]
inode: allow O_DIRECT reads building from Will's direct change

9 years agoMerge pull request #109 from willsowerbutts/readi
EtchedPixels [Fri, 13 Feb 2015 17:54:22 +0000 (17:54 +0000)]
Merge pull request #109 from willsowerbutts/readi

Kernel: readi() - when reading whole sectors, transfer them directly into user memory.

9 years agozx128: fix banking returns through common and discard
Alan Cox [Fri, 13 Feb 2015 17:05:57 +0000 (17:05 +0000)]
zx128: fix banking returns through common and discard

With this little gem fixed we can now get all the way through the IDE probe
in banked code and to the bootdev prompt.

9 years agodevide: remove escaped debug, ifdef routine not always required
Alan Cox [Fri, 13 Feb 2015 17:03:56 +0000 (17:03 +0000)]
devide: remove escaped debug, ifdef routine not always required

9 years agozx128: switch to mainline bankfixed
Alan Cox [Fri, 13 Feb 2015 15:46:58 +0000 (15:46 +0000)]
zx128: switch to mainline bankfixed

It now handles the cases that prevented it being used

9 years agozx128: use the ROM font
Alan Cox [Fri, 13 Feb 2015 15:40:28 +0000 (15:40 +0000)]
zx128: use the ROM font

Saves us more memory

9 years agozx128: we have two banks so simplify their setup
Alan Cox [Fri, 13 Feb 2015 15:40:08 +0000 (15:40 +0000)]
zx128: we have two banks so simplify their setup

9 years agoKernel: readi() now does direct transfers only if CONFIG_LARGE_IO_DIRECT
Will Sowerbutts [Thu, 12 Feb 2015 14:33:57 +0000 (14:33 +0000)]
Kernel: readi() now does direct transfers only if CONFIG_LARGE_IO_DIRECT
is defined in the platform config.h

9 years agoKernel: readi(): respect u_sysio flag
Will Sowerbutts [Thu, 12 Feb 2015 13:55:24 +0000 (13:55 +0000)]
Kernel: readi(): respect u_sysio flag

9 years agoKernel: readi() - when reading whole sectors, transfer them directly
Will Sowerbutts [Wed, 11 Feb 2015 19:58:45 +0000 (19:58 +0000)]
Kernel: readi() - when reading whole sectors, transfer them directly
into user memory.

9 years agoKernel: revised rules.mk/target.mk
Alan Cox [Fri, 13 Feb 2015 15:25:18 +0000 (15:25 +0000)]
Kernel: revised rules.mk/target.mk

9 years agosnprintf: first cut at snprintf and friends
Alan Cox [Fri, 13 Feb 2015 15:24:18 +0000 (15:24 +0000)]
snprintf: first cut at snprintf and friends

9 years agoprocess: correct behaviour of kill to process 1
Alan Cox [Fri, 13 Feb 2015 14:54:35 +0000 (14:54 +0000)]
process: correct behaviour of kill to process 1

In unixdom this has a magic exception that only handled signals are delivered
to process 1, those that would kill it are ignored.

9 years agoRevert "Revert "Kernel: cpu-z180/rules.mk can just inherit everything from cpu-z80""
Alan Cox [Fri, 13 Feb 2015 14:52:28 +0000 (14:52 +0000)]
Revert "Revert "Kernel: cpu-z180/rules.mk can just inherit everything from cpu-z80""

Put back the Z180 change

This reverts commit 0bcaf324642c0b16b34852d48ac5272ef6d4024a.

9 years agoMakefiles: rework Will's changes in order to make overrides work again
Alan Cox [Fri, 13 Feb 2015 14:51:13 +0000 (14:51 +0000)]
Makefiles: rework Will's changes in order to make overrides work again

We now use target.mk (mandatory) for per platform initial settings and we use
rules.mk (optional) in the platform directory after the CPU rules are processed
in order to override them

9 years agoRevert "Kernel: cpu-z180/rules.mk can just inherit everything from cpu-z80"
Alan Cox [Fri, 13 Feb 2015 14:34:16 +0000 (14:34 +0000)]
Revert "Kernel: cpu-z180/rules.mk can just inherit everything from cpu-z80"

Reverting the target/platform rules.mk changes - they break too much stuff

This reverts commit 02bcf7af9276326e94d3127786d7535f37baebef.