David Given [Thu, 4 Jun 2015 20:47:21 +0000 (22:47 +0200)]
cc65 constness workaround.
David Given [Thu, 4 Jun 2015 20:30:37 +0000 (22:30 +0200)]
Merge from upstream.
Alan Cox [Thu, 4 Jun 2015 12:43:10 +0000 (13:43 +0100)]
inittab: sample inittab
Tormod Volden [Thu, 4 Jun 2015 11:08:15 +0000 (13:08 +0200)]
dragon-nx32: Update XRoar patch for 0.33.2 release
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Thu, 4 Jun 2015 10:43:14 +0000 (11:43 +0100)]
readi: Fix sign handling problems
We are permitted to write from beyond EOF, but a read from beyond EOF must
return 0
Alan Cox [Thu, 4 Jun 2015 10:42:58 +0000 (11:42 +0100)]
Revert "readi: read EOF handling fix"
This reverts commit
d39c1632e9685bffd5d94699a0ff953f716ab8fc.
Duh
Alan Cox [Thu, 4 Jun 2015 10:36:37 +0000 (11:36 +0100)]
readi: read EOF handling fix
Sign problems...
We can read from beyond end of file but must EOF (unlike write)
Tormod Volden [Thu, 4 Jun 2015 07:40:46 +0000 (09:40 +0200)]
dragon-nx32: Don't copy istack on switch/fork
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 4 Jun 2015 07:40:45 +0000 (09:40 +0200)]
dragon-nx32: Only copy used memory on fork
Speed up forking by not copying the space between heap and stack.
Alan's suggestion.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Thu, 4 Jun 2015 07:40:44 +0000 (09:40 +0200)]
Access udata "break" member from asm
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Thu, 4 Jun 2015 09:13:09 +0000 (10:13 +0100)]
dragon-nx32: don't re-enter the scrolling routines while scrolling
If you do it ends badly
Alan Cox [Wed, 3 Jun 2015 22:15:17 +0000 (23:15 +0100)]
dragon-nx-32: tidy up machine identification
Confirmed COCO and COCO3 idents
Alan Cox [Wed, 3 Jun 2015 22:04:49 +0000 (23:04 +0100)]
dragon-nx-32: Note in README that the patch for xroar is not for 0.33
Alan Cox [Wed, 3 Jun 2015 22:03:34 +0000 (23:03 +0100)]
dragon: switch to autodetecting the dragon v coco
And do a quick swizzle on the lines to avoid having two keymaps.
The platform detect is a bit dubious - possibly some magic ROM location would
be safer.
50/60Hz also needs doing but that's a timing loop problem I think
Alan Cox [Wed, 3 Jun 2015 22:01:34 +0000 (23:01 +0100)]
dragon32: add a systemid define
Alan Cox [Wed, 3 Jun 2015 22:01:10 +0000 (23:01 +0100)]
dragon32: add header changes for floppy timeout
Tormod Volden [Wed, 3 Jun 2015 20:28:22 +0000 (22:28 +0200)]
dragon-nx32: Small bank copy optimization
Use direct page addressing for the bank switching. Speeds
up forking a tiny bit.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Wed, 3 Jun 2015 19:56:18 +0000 (21:56 +0200)]
execve: Use ugets for copying argument 0 to udata
The argument list gets squeezed in at the process memory top,
and if it is short, copying all 8 bytes might read above top.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Tormod Volden [Wed, 3 Jun 2015 19:46:23 +0000 (21:46 +0200)]
Add "env" to disk image and "reboot" to 6809 build
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Wed, 3 Jun 2015 17:55:57 +0000 (18:55 +0100)]
dragondos: floppy timer
Alan Cox [Wed, 3 Jun 2015 17:43:15 +0000 (18:43 +0100)]
dragondos: with these changes we have working floppy
Tormod Volden [Wed, 3 Jun 2015 17:04:30 +0000 (19:04 +0200)]
utils: Add text.hot and text.unlikely to dragon* link scripts
gcc generated these sections for init, ssh and grep, and they
were silently ignored by lwlink.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Wed, 3 Jun 2015 11:07:30 +0000 (12:07 +0100)]
dragon-nx-32: more floppy work
Alan Cox [Wed, 3 Jun 2015 00:03:14 +0000 (01:03 +0100)]
dragondos: get read side of driver working
With these changes we can now read dragondos floppies fairly reliably. We
need to optimise the wait for the initial DRQ as now and then we don't quite
make it in the clocks allowed and end up retrying
Writes blow up at the end of the second write in a FIRQ storm, not sure why
yet. Possibly its up to us to disable FIRQ in the NMI handler ?
Alan Cox [Tue, 2 Jun 2015 23:27:49 +0000 (00:27 +0100)]
dragon-nx-32: README note how to build a dragondos cart becker loader
Alan Cox [Tue, 2 Jun 2015 23:27:25 +0000 (00:27 +0100)]
6809: hopefully sort out the branches and stack save this time
Alan Cox [Tue, 2 Jun 2015 23:27:10 +0000 (00:27 +0100)]
floppy: seek target goes in the data register
Alan Cox [Tue, 2 Jun 2015 23:16:08 +0000 (00:16 +0100)]
Revert "lowlevel-6809.s flag test fixup"
This reverts commit
588f60ed5c1019cd0fb9f9d3d3210944a6c89adc.
Tormod Volden [Tue, 2 Jun 2015 22:10:59 +0000 (00:10 +0200)]
lowlevel-6809.s flag test fixup
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Tue, 2 Jun 2015 22:56:45 +0000 (23:56 +0100)]
dragon-nx-32: first floppy fixes
Track 0 now behaves. Seeking to other tracks breaks.
Alan Cox [Tue, 2 Jun 2015 22:00:45 +0000 (23:00 +0100)]
From: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Tue, 2 Jun 2015 21:58:48 +0000 (22:58 +0100)]
netdev: forgot netdev.h
#facepalm
Alan Cox [Tue, 2 Jun 2015 21:58:18 +0000 (22:58 +0100)]
dragon-nx-32: enable optimisation trick
Alan Cox [Tue, 2 Jun 2015 19:23:39 +0000 (20:23 +0100)]
dragon: sort of fix outchar()
Alan Cox [Tue, 2 Jun 2015 19:23:17 +0000 (20:23 +0100)]
6809: fix task scheduler changes
Alan Cox [Tue, 2 Jun 2015 17:27:48 +0000 (18:27 +0100)]
syscall_net: build on Z80
Alan Cox [Tue, 2 Jun 2015 17:23:18 +0000 (18:23 +0100)]
udata: optimise the udata handling further for bankfixed
Take the idle in the thread doing switchout() and make it act simply as a
function call (no udata switch) providing
- We go from just us running to idle
- We are the only process woken
This saves us a lot. It has to be per arch and per banking type but it does
live entirely in switchout() and is invisible to the core so has no affect
on anything it doesn't work with or where it makes no sense.
Also add it for the 6809, although the 6809 changes from nready all still
need debugging first, so its disabled.
Alan Cox [Mon, 1 Jun 2015 22:05:34 +0000 (23:05 +0100)]
syscall_net: fill in sockpending
Alan Cox [Mon, 1 Jun 2015 22:01:57 +0000 (23:01 +0100)]
Makefile: add syscall_net.c
Nobody links it yet but sending it through the compiler is still useful
Alan Cox [Mon, 1 Jun 2015 22:00:09 +0000 (23:00 +0100)]
syscall_net: first pieces
Lots left to put together for the non protocol parts of the stack, but this
is a starting point.
Alan Cox [Mon, 1 Jun 2015 21:59:34 +0000 (22:59 +0100)]
kernel: add some networking error codes we will need
Alan Cox [Mon, 1 Jun 2015 21:58:55 +0000 (22:58 +0100)]
cpu-6809: add ntohs/ntohl for networking work
Starting here as it's easier to work on bigendian first
Alan Cox [Mon, 1 Jun 2015 20:09:55 +0000 (21:09 +0100)]
dragon: update to need_resched
Alan Cox [Mon, 1 Jun 2015 20:09:00 +0000 (21:09 +0100)]
dragon: update for _kernel_flag removal and need_resched
David Given [Mon, 1 Jun 2015 20:01:58 +0000 (22:01 +0200)]
Rename the applications' build targets to be less annoying.
Alan Cox [Mon, 1 Jun 2015 19:49:13 +0000 (20:49 +0100)]
dragon: use the version of devdw in the dev directory
Alan Cox [Mon, 1 Jun 2015 19:48:53 +0000 (20:48 +0100)]
dragon-nx-32: use the version of devdw in dev/
David Given [Mon, 1 Jun 2015 19:48:19 +0000 (21:48 +0200)]
Realised I forgot to add levee and sh to the filesystem image. Cleaned up
setjmp and longjmp a bit (needed by sh); add a totally untested msp430
version.
Alan Cox [Mon, 1 Jun 2015 19:47:21 +0000 (20:47 +0100)]
trs80: first cut at drivewire support
Limited to a whopping 19200 baud, and assumes you set up the /dev/tty3 port as you want then run drivewire (don't mix and match!)
Needs optimising, actually testing once I've fixed the emulator to do better
serial proxying.
Alan Cox [Mon, 1 Jun 2015 19:46:42 +0000 (20:46 +0100)]
devdw: move common bits to the dev/ directory
David Given [Mon, 1 Jun 2015 19:36:24 +0000 (21:36 +0200)]
More compiler fixes; mismatched function prototype for gcc, some
smallification and const casts for cc65.
David Given [Mon, 1 Jun 2015 19:19:22 +0000 (21:19 +0200)]
Export the standalone tools and the filesystem image so the user can
actually do something useful with them...
Alan Cox [Mon, 1 Jun 2015 10:46:06 +0000 (11:46 +0100)]
syscall: correct various error returns to follow the spec
Alan Cox [Mon, 1 Jun 2015 10:31:58 +0000 (11:31 +0100)]
ssh: further improvements
- Remove pwd and kill as they suck in a ton of code
- Add background processes
- Add redirection
Alan Cox [Sun, 31 May 2015 22:08:32 +0000 (23:08 +0100)]
tiddles: beginnings of new editor
Just sticking the code somewhere for the moment while I work on it
Alan Cox [Sun, 31 May 2015 18:05:46 +0000 (19:05 +0100)]
ssh: Add .sshrc and also parsing support for quoting etc
Alan Cox [Sun, 31 May 2015 17:29:51 +0000 (18:29 +0100)]
kernel: add p_top so we can do swap in banking modes not just fixed bank
Alan Cox [Sun, 31 May 2015 16:00:23 +0000 (17:00 +0100)]
trs80: no need to copy the istack now
Alan Cox [Sun, 31 May 2015 16:00:09 +0000 (17:00 +0100)]
TODO: update
Alan Cox [Sun, 31 May 2015 15:59:39 +0000 (16:59 +0100)]
z80fixedbank: Enable Tormod's UDATA optimisation
Alan Cox [Sun, 31 May 2015 15:27:21 +0000 (16:27 +0100)]
dragon-nx-32: initial patches to move to the new IRQ stack arrangement
We still copy 256 more bytes than we should..
David Given [Sat, 30 May 2015 20:29:43 +0000 (22:29 +0200)]
Move the rules.mk files out of the platforms directory (where they didn't
belong).
--HG--
rename : Build/platforms/cc65.rules.mk => Build/cc65.rules.mk
rename : Build/platforms/sdcc.rules.mk => Build/sdcc.rules.mk
rename : Build/platforms/standard.rules.mk => Build/standard.rules.mk
rename : Build/platforms/targetgcc.rules.mk => Build/targetgcc.rules.mk
David Given [Sat, 30 May 2015 19:47:53 +0000 (21:47 +0200)]
Factored out some gnarly common rules into their own file, so that they're now
only defined in one place.
Alan Cox [Sat, 30 May 2015 18:44:24 +0000 (19:44 +0100)]
z180: update for new IRQ scheme
Alan Cox [Sat, 30 May 2015 18:36:15 +0000 (19:36 +0100)]
msx2: correct for new style IRQ handling
Untested - needs the Makefiles fixing for the fact bootrom.bin has no
rule to create it
Alan Cox [Sat, 30 May 2015 18:28:15 +0000 (19:28 +0100)]
msx1: update core bits to new interrupt logic
David Given [Sat, 30 May 2015 16:27:49 +0000 (18:27 +0200)]
Merge from master.
Alan Cox [Sat, 30 May 2015 14:23:53 +0000 (15:23 +0100)]
zx128: update to new interrupt scheme
Untested as banked not yet converted
Alan Cox [Sat, 30 May 2015 14:22:18 +0000 (15:22 +0100)]
zeta: update to new IRQ scheme
Alan Cox [Sat, 30 May 2015 13:55:48 +0000 (14:55 +0100)]
socz80: align with new IRQ code
Alan Cox [Sat, 30 May 2015 13:55:16 +0000 (14:55 +0100)]
px4plus: initial mods for new IRQ code
This platform uses the banked build so at the moment this can't be built
or tested
Alan Cox [Sat, 30 May 2015 13:54:18 +0000 (14:54 +0100)]
z80pack: resync to IRQ changes
Alan Cox [Sat, 30 May 2015 13:02:28 +0000 (14:02 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sat, 30 May 2015 12:50:28 +0000 (13:50 +0100)]
pcw8256: sync with the irq changes
Alan Cox [Sat, 30 May 2015 12:44:19 +0000 (13:44 +0100)]
nc100: fix tty handling on close
Alan Cox [Sat, 30 May 2015 12:43:44 +0000 (13:43 +0100)]
nc100: update to use new style IRQ handling
Alan Cox [Sat, 30 May 2015 12:38:33 +0000 (13:38 +0100)]
mtx: remove dead 'kernel_flag'
Alan Cox [Sat, 30 May 2015 12:38:20 +0000 (13:38 +0100)]
mtx: fix tty compile with close() changes
Alan Cox [Sat, 30 May 2015 12:31:22 +0000 (13:31 +0100)]
micropack: update to the new flags
Alan Cox [Sat, 30 May 2015 12:23:28 +0000 (13:23 +0100)]
sdltrs: Commit emulator patches
These are needed to run Fuzix reliably
Alan Cox [Sat, 30 May 2015 12:09:34 +0000 (13:09 +0100)]
lowlevel-z80: put back the basics for the zero pointer trap
EtchedPixels [Sat, 30 May 2015 11:52:32 +0000 (12:52 +0100)]
Merge pull request #196 from davidgiven/cc65fixes
Some cc65 fixes
David Given [Sat, 30 May 2015 10:39:57 +0000 (12:39 +0200)]
Prefer the cc65 bzero to the Fuzix one.
David Given [Sat, 30 May 2015 10:39:45 +0000 (12:39 +0200)]
More cc65 const correctness workarounds.
David Given [Sat, 30 May 2015 10:30:33 +0000 (12:30 +0200)]
Merge from master.
David Given [Sat, 30 May 2015 10:27:12 +0000 (12:27 +0200)]
Add generic gcc toolchain support; also add rather dubious msp430x libc
support to test this with.
--HG--
rename : Build/platforms/6502test.mk => Build/platforms/msp430fr5969.mk
rename : Build/platforms/cc65.rules.mk => Build/platforms/targetgcc.rules.mk
rename : Library/include/6502/stdint.h => Library/include/msp430x/stdint.h
rename : Library/tools/syscall_6809.c => Library/tools/syscall_msp430x.c
David Given [Sat, 30 May 2015 10:26:46 +0000 (12:26 +0200)]
Fix const correctness (needed by gcc).
--HG--
extra : source :
6667b8989e26c545f8813b2d4ed6d7e8ec69ebb9
David Given [Sat, 30 May 2015 10:26:46 +0000 (12:26 +0200)]
Fix const correctness (needed by gcc).
Brett Gordon [Fri, 29 May 2015 15:36:21 +0000 (11:36 -0400)]
FUZIX: ssh.c: environment assignment bugfix + prettier prompting
here's a patch to ssh.c that:
1. Sets the prompt to include a space
2. Prints a newline in the output of the built-in "pwd"
3. Fixes environment variable assignment
As to no. 3: The original code used "putenv()", which, on a new
variable, inserts the tmp char * in to the env[] array. "ssh"
proceeded to reuse this string for more input, thereby screwing up the
environment. I changed it to "setenv()" which makes a new copy of the
string, then inserts it into env[].
This way at least us poor "ssh" users can set PATH until the real "sh"
and "init" are working better for the 6809.
--
Brett M. Gordon,
beretta42@gmail.com
Alan Cox [Sat, 30 May 2015 02:03:49 +0000 (03:03 +0100)]
process: rewrite the interrupt handling logic to be sane
We get rid of the whole UZI inherited irq stack madness as it leaves us
with a bunch of hard/unfixable problems.
Instead
- We only need one interrupt stack (although several if the banking is easier
still works just fine)
- We don't task switch on the IRQ stack, instead if we are going to be
pre-empting we pull a stunt with push/reti to complete the IRQ to
the devices and then task switch on the syscall stack and do
signal processing
This fixes all the pre-emption related crashes and mess with map saving. We
never have to bail from an IRQ because we are already in it. Various other
bits become cleaner.
In the process also rewrite (hopefully correctly this time) the Z80 signal
return paths.
This will probably break everything except Z80 platform devices using the
bankfixed helpers.
Note: The new IRQ code breaks sdltrs. I'll upload some patches for that
when I get a bit of time. Elements of the IRQ emulation and also reti
emulation are buggy in sdltrs it seems.
FIXME:
- At least one additional di to work around bits of the trs80 bugs
can go away
Alan Cox [Sat, 30 May 2015 02:02:53 +0000 (03:02 +0100)]
start: we are effectively in syscall when we create init
Alan Cox [Sat, 30 May 2015 02:02:42 +0000 (03:02 +0100)]
vt: fix backup over start of line
Alan Cox [Fri, 29 May 2015 14:49:22 +0000 (15:49 +0100)]
process: work on pre-emption - give it its own debug form
Also scribble over the p_page pointers of the dead process on exit so
we can catch that case
Alan Cox [Fri, 29 May 2015 14:48:42 +0000 (15:48 +0100)]
utils: add a "while(1)" app for testing pre-emption bugs
Alan Cox [Fri, 29 May 2015 14:47:58 +0000 (15:47 +0100)]
tools/mostcalled: find most called Z80 fns, so we can do RST hacks
Alan Cox [Fri, 29 May 2015 14:47:39 +0000 (15:47 +0100)]
ucp-script: improvements for new init
Alan Cox [Fri, 29 May 2015 14:47:18 +0000 (15:47 +0100)]
fsck: allow path:offset
Alan Cox [Fri, 29 May 2015 14:46:59 +0000 (15:46 +0100)]
syscall_proc: fix yield bug
Tormod Volden [Thu, 28 May 2015 21:04:51 +0000 (23:04 +0200)]
Add uptime to Makefile.6809 and disk image
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Alan Cox [Thu, 28 May 2015 22:22:19 +0000 (23:22 +0100)]
dragon-nx32: go with black on green for now
Black on white is also possible but not apparently anything sane like white
on black. Black on white looks too much like a spectrum, black on green
keeps the classic Dragon feel while giving us sensible fonts.