FUZIX.git
6 years agosbcv2: First cut at Zeta floppy support
Alan Cox [Sun, 26 Aug 2018 13:06:07 +0000 (14:06 +0100)]
sbcv2: First cut at Zeta floppy support

6 years agodevfd: Allow for hardware without CCR or HD.
Alan Cox [Sun, 26 Aug 2018 13:04:17 +0000 (14:04 +0100)]
devfd: Allow for hardware without CCR or HD.

Minimal changes. This can all get properly addressed when we tackle unifying the
floppy driver support

6 years agosbcv2: Change default nomenclature, add explanation of file system building
Alan Cox [Sun, 26 Aug 2018 11:21:46 +0000 (12:21 +0100)]
sbcv2: Change default nomenclature, add explanation of file system building

6 years agosbcv2: Add support for timer hack mode (DSR wired to a 10Hz clock)
Alan Cox [Sat, 25 Aug 2018 20:57:07 +0000 (21:57 +0100)]
sbcv2: Add support for timer hack mode (DSR wired to a 10Hz clock)

Specify timermsr on the command line for this and the kernel will instead of
polling the timers look for DSR signal events on the UART, effectively using
the UART as an interrupt controller.

Still need to support routing ECB interrupts this way.

6 years agosbcv2: adjust the UDATA size and stash in the asm side
Alan Cox [Sat, 25 Aug 2018 20:56:38 +0000 (21:56 +0100)]
sbcv2: adjust the UDATA size and stash in the asm side

6 years agodevtty: Various uart fixes for baud etc
Alan Cox [Sat, 25 Aug 2018 20:56:09 +0000 (21:56 +0100)]
devtty: Various uart fixes for baud etc

6 years agosbcv2: move the udata stash up 256 bytes
Alan Cox [Sat, 25 Aug 2018 20:55:41 +0000 (21:55 +0100)]
sbcv2: move the udata stash up 256 bytes

We don't need to keep a copy of the istack

6 years agon8vem4/p112: Add in the full RTC support
Alan Cox [Sat, 25 Aug 2018 18:37:14 +0000 (19:37 +0100)]
n8vem4/p112: Add in the full RTC support

Again now it's in common code it's just a define.

6 years agozetav2: Turn on full rtc support
Alan Cox [Sat, 25 Aug 2018 18:26:59 +0000 (19:26 +0100)]
zetav2: Turn on full rtc support

Now it's in the common driver code it's a matter of a define

6 years agoMakefile: add N8VEM v2 to the list
Alan Cox [Sat, 25 Aug 2018 18:21:39 +0000 (19:21 +0100)]
Makefile: add N8VEM v2 to the list

6 years agods1302: Move the rtc_read/write helpers to the common code
Alan Cox [Sat, 25 Aug 2018 18:19:42 +0000 (19:19 +0100)]
ds1302: Move the rtc_read/write helpers to the common code

6 years agosetdate: Fix bugs in BCD mode
Alan Cox [Sat, 25 Aug 2018 18:16:08 +0000 (19:16 +0100)]
setdate: Fix bugs in BCD mode

With these fixed it now works correctly against the DS1302

6 years agosbcv2: default to 115200 baud
Alan Cox [Sat, 25 Aug 2018 18:15:38 +0000 (19:15 +0100)]
sbcv2: default to 115200 baud

Even better would be to see what ROMWBW set and use it perhaps.

6 years agosbcv2: remove boot time debug
Alan Cox [Sat, 25 Aug 2018 18:15:18 +0000 (19:15 +0100)]
sbcv2: remove boot time debug

6 years agosbcv2: More UART features
Alan Cox [Sat, 25 Aug 2018 18:14:28 +0000 (19:14 +0100)]
sbcv2: More UART features

In particular set up the port properly rather than relying on ROMWBW. Also
turn on the interrupts.

6 years agosbcv2: initial basic PropIO probe
Alan Cox [Sat, 25 Aug 2018 18:13:59 +0000 (19:13 +0100)]
sbcv2: initial basic PropIO probe

Use the uart console if we have no PropIO, otherwise default to the PropIO

6 years agokernel: don't make the console block on carrier
Alan Cox [Sat, 25 Aug 2018 18:08:07 +0000 (19:08 +0100)]
kernel: don't make the console block on carrier

It's really annoying if you've not got it wired and you can't work out why
it hangs on boot!

6 years agoplatform-sbcv2: N8VEM Mark 2
Alan Cox [Sat, 25 Aug 2018 14:21:53 +0000 (15:21 +0100)]
platform-sbcv2: N8VEM Mark 2

A nice simple tickless platform to use as a reference.

Supports the PPIDE and PropIOv2. Currently only works with PropIOv2 present
until I fix a bit of probing logic.

6 years agods1302: update header
Alan Cox [Sat, 25 Aug 2018 14:20:56 +0000 (15:20 +0100)]
ds1302: update header

Export more bits people need outside of the driver

6 years agokernel: Document the new tickless kernel
Alan Cox [Sat, 25 Aug 2018 14:19:13 +0000 (15:19 +0100)]
kernel: Document the new tickless kernel

No it's not like the Linux one - this is for hardware with no timer tick!

6 years agosam: Further fixing and cleanups
Alan Cox [Sat, 25 Aug 2018 14:16:30 +0000 (15:16 +0100)]
sam: Further fixing and cleanups

We now start running init but blow up weirdly when opening the inittab

6 years agotimer: last bits needed for a platform without a timer interrupt
Alan Cox [Sat, 25 Aug 2018 14:16:04 +0000 (15:16 +0100)]
timer: last bits needed for a platform without a timer interrupt

6 years agoubee: remove duplicate include
Alan Cox [Sat, 25 Aug 2018 14:15:43 +0000 (15:15 +0100)]
ubee: remove duplicate include

6 years agods1302: note some code should be shared better
Alan Cox [Sat, 25 Aug 2018 14:14:59 +0000 (15:14 +0100)]
ds1302: note some code should be shared better

6 years agoubee: fix bogus copied comment
Alan Cox [Sat, 25 Aug 2018 14:14:37 +0000 (15:14 +0100)]
ubee: fix bogus copied comment

6 years agoz80-thunked: More assorted fixes
Alan Cox [Sat, 25 Aug 2018 14:13:57 +0000 (15:13 +0100)]
z80-thunked: More assorted fixes

We are now at the point some syscalls sort of work

6 years agotrs80/genie: Fix rtc handling
Alan Cox [Sat, 25 Aug 2018 14:13:07 +0000 (15:13 +0100)]
trs80/genie: Fix rtc handling

It's not active yet but fix the bug I noticed

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sat, 25 Aug 2018 13:07:19 +0000 (14:07 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agoMerge pull request #655 from beretta42/cave
EtchedPixels [Sat, 25 Aug 2018 13:05:32 +0000 (14:05 +0100)]
Merge pull request #655 from beretta42/cave

cave: install database to where advent expects it

6 years agocave: install database to where advent expects it
Brett Gordon [Fri, 24 Aug 2018 04:22:53 +0000 (00:22 -0400)]
cave: install database to where advent expects it

6 years agokernel Introduce tickless kernel support
Alan Cox [Wed, 22 Aug 2018 10:24:51 +0000 (11:24 +0100)]
kernel Introduce tickless kernel support

This isn't the same as a Linux tickless kernel. Rather it's support (such as
there can be) for systems that have interrupts for serial but no actual
timer tick.

6 years agosyscall_exec16: Rework close_on_exec a bit to fix SDCC crap code generation
Alan Cox [Wed, 22 Aug 2018 10:24:07 +0000 (11:24 +0100)]
syscall_exec16: Rework close_on_exec a bit to fix SDCC crap code generation

6 years agousermem-std-thunked: add a comment
Alan Cox [Wed, 22 Aug 2018 10:23:50 +0000 (11:23 +0100)]
usermem-std-thunked: add a comment

6 years agosam: optimize kernel return path a tiny bit
Alan Cox [Mon, 20 Aug 2018 23:05:09 +0000 (00:05 +0100)]
sam: optimize kernel return path a tiny bit

6 years agosam: add a low 512 byte buffer ready for ramdisk support
Alan Cox [Mon, 20 Aug 2018 23:04:13 +0000 (00:04 +0100)]
sam: add a low 512 byte buffer ready for ramdisk support

6 years agoatom: remove dead comment
Alan Cox [Mon, 20 Aug 2018 23:03:56 +0000 (00:03 +0100)]
atom: remove dead comment

6 years agoz80thunked: Fix some more bugs
Alan Cox [Mon, 20 Aug 2018 23:03:00 +0000 (00:03 +0100)]
z80thunked: Fix some more bugs

- Interrupt return to kernel must restore the saved low page or an interrupt
  during a user copy explodes
- System call and interrupt entry routines must be high

6 years agobank32k: Handle high/low stubs
Alan Cox [Mon, 20 Aug 2018 23:02:16 +0000 (00:02 +0100)]
bank32k: Handle high/low stubs

In 32K/32K mode we have stubs high and low so program_vectors is needed
if we shrink space too

6 years agoz80-thunked: doexec needs to be in high space
Alan Cox [Sun, 19 Aug 2018 22:13:17 +0000 (23:13 +0100)]
z80-thunked: doexec needs to be in high space

6 years agousermem: Fix the thunked z80 uput and some other bugs
Alan Cox [Sun, 19 Aug 2018 22:12:36 +0000 (23:12 +0100)]
usermem: Fix the thunked z80 uput and some other bugs

This gets us to the point we are creating the user bits and reading them
sufficiently to begin loading /init

6 years agosam: video and stub fixes
Alan Cox [Sun, 19 Aug 2018 20:12:14 +0000 (21:12 +0100)]
sam: video and stub fixes

Rearrange our logic a bit so we can copy the stubs where we need them
Copy stubs into the top of the video 32K so we can in theory at some point
re-arrange the video logic and maps to keep interrupts on by using a private
low stack and high mapping video.
Fix the last character on a line being corrupted
Add initial (not used) colour support for the console

6 years agosam: more work on the ATA disk interface
Alan Cox [Sun, 19 Aug 2018 14:19:26 +0000 (15:19 +0100)]
sam: more work on the ATA disk interface

We can now detect Atom and Atom Lite, as well as select the right 8 or 16bit
handling for them. The 16bit handlers are hairy because we can be doing an
I/O that crosses a page boundary. This needs a bit of thought to keep it
efficient. Atom Lite on the other hand appears to be trivial.

6 years agodevide: Add the ability to have a mix of 8 and 16bit interfaces
Alan Cox [Sun, 19 Aug 2018 14:18:51 +0000 (15:18 +0100)]
devide: Add the ability to have a mix of 8 and 16bit interfaces

The SAM we need to do this and RC2014 will also eventually need it.

6 years agosam: update the keyboard logic and tables
Alan Cox [Sun, 19 Aug 2018 00:29:35 +0000 (01:29 +0100)]
sam: update the keyboard logic and tables

With this done it seems the keyboard is working properly

6 years agosam: more work on the IDE layer
Alan Cox [Sun, 19 Aug 2018 00:28:32 +0000 (01:28 +0100)]
sam: more work on the IDE layer

I think it probably works for kernel now (user is broken and the split word
case is nasty so will need some thinking).

Need to update to the 1.1 alpha emulator as SimCoupe 1.0 can't do LBA and
has other ATA bugs

6 years agokeycode: add another code
Alan Cox [Sun, 19 Aug 2018 00:27:48 +0000 (01:27 +0100)]
keycode: add another code

6 years agodevide: allow for 16bit ports
Alan Cox [Sun, 19 Aug 2018 00:27:26 +0000 (01:27 +0100)]
devide: allow for 16bit ports

We don't need it yet but add it ready

6 years agosam: further keymap work
Alan Cox [Sat, 18 Aug 2018 21:57:20 +0000 (22:57 +0100)]
sam: further keymap work

6 years agokernel: add KEY_COPYRIGHT and KEY_EDIT
Alan Cox [Sat, 18 Aug 2018 21:57:03 +0000 (22:57 +0100)]
kernel: add KEY_COPYRIGHT and KEY_EDIT

6 years agousermem-z80-thunked: Fix offsets for 32K/32K mode
Alan Cox [Sat, 18 Aug 2018 19:40:55 +0000 (20:40 +0100)]
usermem-z80-thunked: Fix offsets for 32K/32K mode

With this fixed we can attempt (and fail) to mount a file system

6 years agosam: base keyboard map
Alan Cox [Sat, 18 Aug 2018 19:40:22 +0000 (20:40 +0100)]
sam: base keyboard map

Still need to do all the shift stuff

6 years agotty: note an optimization area
Alan Cox [Sat, 18 Aug 2018 19:34:16 +0000 (20:34 +0100)]
tty: note an optimization area

6 years agosam: fix keyboard scan logic
Alan Cox [Sat, 18 Aug 2018 19:16:50 +0000 (20:16 +0100)]
sam: fix keyboard scan logic

With this fixed we now get key events. We don't get the right keys because the
keyboard map isn't yet correct.

6 years agosam: Fix scrolling
Alan Cox [Sat, 18 Aug 2018 19:16:37 +0000 (20:16 +0100)]
sam: Fix scrolling

6 years agosam: correct check for timer interrupt
Alan Cox [Sat, 18 Aug 2018 19:15:54 +0000 (20:15 +0100)]
sam: correct check for timer interrupt

6 years agosam: call the keyboard scanner
Alan Cox [Sat, 18 Aug 2018 19:15:36 +0000 (20:15 +0100)]
sam: call the keyboard scanner

6 years agosam: turn off debug stop loop
Alan Cox [Sat, 18 Aug 2018 19:15:20 +0000 (20:15 +0100)]
sam: turn off debug stop loop

6 years agosam: further debugging work
Alan Cox [Sat, 18 Aug 2018 15:18:05 +0000 (16:18 +0100)]
sam: further debugging work

We now get to the bootdev prompt with interrupts running. No keyboard input
yet but that's next to investigate.

Note that there's a stop after loading so if you are using simcoupe you need
to hit shift-F10, ctrl-downarrow escape to set it loose (or set up debugger
stuff first as needed)

6 years agofontexpand: fix the bug
Alan Cox [Sat, 18 Aug 2018 00:01:04 +0000 (01:01 +0100)]
fontexpand: fix the bug

Now the fonts look right

6 years agosam: note bug in program_vectors
Alan Cox [Sat, 18 Aug 2018 00:00:53 +0000 (01:00 +0100)]
sam: note bug in program_vectors

6 years agofontexpand: fix endian dependancy
Alan Cox [Fri, 17 Aug 2018 23:52:44 +0000 (00:52 +0100)]
fontexpand: fix endian dependancy

I'm still not sure we have it all correct yet

6 years agotools/binman: allow for a kernel with low and high pages
Alan Cox [Fri, 17 Aug 2018 23:52:05 +0000 (00:52 +0100)]
tools/binman: allow for a kernel with low and high pages

We don't pack such images (yet anyway). We could look at it eventually

6 years agosam: restructure loading a bit fix some display and other bugs
Alan Cox [Fri, 17 Aug 2018 23:51:14 +0000 (00:51 +0100)]
sam: restructure loading a bit fix some display and other bugs

We now get to the point we start trying to boot, and blow up after the
RAM sizing message. I suspect this is program_vectors exploding.

6 years agosam: don't link the font
Alan Cox [Fri, 17 Aug 2018 23:51:04 +0000 (00:51 +0100)]
sam: don't link the font

6 years agosam: Get to the point we enter the kernel
Alan Cox [Fri, 17 Aug 2018 22:23:46 +0000 (23:23 +0100)]
sam: Get to the point we enter the kernel

Fix for binman to allow for our page below code
Assorted logic fixes to the boot and setup code
Make crt0 map the high kernel bank

Video is still broken and we die early in setup but we made it into C

6 years agosam: build bootable image
Alan Cox [Fri, 17 Aug 2018 12:17:57 +0000 (13:17 +0100)]
sam: build bootable image

At least it runs the boot code, not yet useful beyond that step

6 years agoz80: build raw2mgt for Z80 kernel builds
Alan Cox [Fri, 17 Aug 2018 12:17:33 +0000 (13:17 +0100)]
z80: build raw2mgt for Z80 kernel builds

6 years agotools: add a raw2mgt too for SAM kernel building
Alan Cox [Fri, 17 Aug 2018 12:17:15 +0000 (13:17 +0100)]
tools: add a raw2mgt too for SAM kernel building

6 years agosetup: we need the ROM off
Alan Cox [Fri, 17 Aug 2018 12:09:47 +0000 (13:09 +0100)]
setup: we need the ROM off

6 years agosam: correct the boot.s code
Alan Cox [Fri, 17 Aug 2018 12:08:32 +0000 (13:08 +0100)]
sam: correct the boot.s code

At this point we seem to be able to load our image. Not yet tried debugging
what happens after bootstrap loads.

6 years agotty: improve behaviour of O_NDELAY
Alan Cox [Fri, 17 Aug 2018 09:44:49 +0000 (10:44 +0100)]
tty: improve behaviour of O_NDELAY

We want to bale out on a polled output port on a reschedule not just sit
assuming the bits will go out shortly

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Fri, 17 Aug 2018 00:35:34 +0000 (01:35 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agodragon-nx32: Use the tty_close wrapper to close DriveWire channel properly
Tormod Volden [Tue, 14 Aug 2018 19:27:24 +0000 (21:27 +0200)]
dragon-nx32: Use the tty_close wrapper to close DriveWire channel properly

Fixes issues when disconnecting login over DriveWire (dwgetty).

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx32: Correct DriveWire minor offset
Tormod Volden [Tue, 14 Aug 2018 19:27:23 +0000 (21:27 +0200)]
dragon-nx32: Correct DriveWire minor offset

Forgot to bump this when adding crt9128 console tty.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoMerge pull request #653 from beretta42/coco2cart
EtchedPixels [Tue, 14 Aug 2018 10:31:50 +0000 (11:31 +0100)]
Merge pull request #653 from beretta42/coco2cart

coco2cart: bug: sdc driver still not returning no of bytes read/writen

6 years agococo2cart: bug: sdc driver still not returning no of bytes read/writen
Brett Gordon [Tue, 14 Aug 2018 02:07:14 +0000 (22:07 -0400)]
coco2cart: bug: sdc driver still not returning no of bytes read/writen

With this fix it boots again on the CoCo2 w/ SDC

6 years agosam: add IDE definitions
Alan Cox [Mon, 13 Aug 2018 12:53:07 +0000 (13:53 +0100)]
sam: add IDE definitions

6 years agosam: more work on fork support for 32/32
Alan Cox [Mon, 13 Aug 2018 12:52:37 +0000 (13:52 +0100)]
sam: more work on fork support for 32/32

6 years agodragon-nx32: Ship custom inittab and rc
Tormod Volden [Sat, 11 Aug 2018 09:32:39 +0000 (11:32 +0200)]
dragon-nx32: Ship custom inittab and rc

inittab:
- do not run sysinit boot shell
- run getty on ttys 1-4
- add commented out dwgetty entry

rc:
- try setting time from DriveWire before resorting to settime

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx32: Only init IDE if we have a known IDE cartridge ROM
Tormod Volden [Sat, 11 Aug 2018 09:18:37 +0000 (11:18 +0200)]
dragon-nx32: Only init IDE if we have a known IDE cartridge ROM

Same as we do for SCSI controllers.

Avoids the long detection timeout when there is no IDE controller
present.

Since we are not using the cartridge ROM, it would be strictly
possible to use a controller without ROM but we won't support
that for now. The same goes for unknown ROMs, of course.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx32: Minor updates to README
Tormod Volden [Sat, 11 Aug 2018 23:32:45 +0000 (01:32 +0200)]
dragon-nx32: Minor updates to README

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sun, 12 Aug 2018 23:55:57 +0000 (00:55 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agogenie-eg64: New platform (in test only)
Alan Cox [Sun, 12 Aug 2018 23:39:57 +0000 (00:39 +0100)]
genie-eg64: New platform (in test only)

The Video Genie EG64 allows you to take a Video Genie (also known as the
Dick Smith System 80, the TRZ80 and a few other names) with either of the
expansion units and the EG64 fitted up to 96K. It's intended for running CP/M
but it's just about big enough to run Fuzix badly providing you have a swap
device on hard disk.

Another goal of this port is to figure out how to move a lot of TRS80 driver
code into dev/trs80 to share between these two ports, a Genie III port maybe,
and also potentially things like the Lobo-Max, Guepard., SysData III and so on.

6 years agotools/binman: Teach it about kernels with the data the top of memory
Alan Cox [Sun, 12 Aug 2018 23:39:26 +0000 (00:39 +0100)]
tools/binman: Teach it about kernels with the data the top of memory

6 years agotrs80m1: update documentation
Alan Cox [Sun, 12 Aug 2018 23:39:07 +0000 (00:39 +0100)]
trs80m1: update documentation

6 years agotrs80m1: Fix more tty bugs
Alan Cox [Sun, 12 Aug 2018 23:38:42 +0000 (00:38 +0100)]
trs80m1: Fix more tty bugs

This lot really needs a restructure instead

6 years agotrs80m1: add initial test UDG support
Alan Cox [Sun, 12 Aug 2018 23:38:13 +0000 (00:38 +0100)]
trs80m1: add initial test UDG support

Needs emulator work to test properly

6 years agotrs80m1: make the lower case status C visible
Alan Cox [Sun, 12 Aug 2018 23:37:35 +0000 (00:37 +0100)]
trs80m1: make the lower case status C visible

6 years agotrs80m1: remove obsolete comment
Alan Cox [Sun, 12 Aug 2018 23:37:20 +0000 (00:37 +0100)]
trs80m1: remove obsolete comment

6 years agotrs80m1: remove bogus asm
Alan Cox [Sun, 12 Aug 2018 23:36:36 +0000 (00:36 +0100)]
trs80m1: remove bogus asm

6 years agotrs80m1: Fix bogus comment
Alan Cox [Sun, 12 Aug 2018 23:36:13 +0000 (00:36 +0100)]
trs80m1: Fix bogus comment

6 years agotty.h: add new font type
Alan Cox [Sun, 12 Aug 2018 23:35:33 +0000 (00:35 +0100)]
tty.h: add new font type

6 years agotrs80m1: remove drivewire reference
Alan Cox [Sun, 12 Aug 2018 23:35:19 +0000 (00:35 +0100)]
trs80m1: remove drivewire reference

6 years agodragon-nx-32: note bug to look at
Alan Cox [Sun, 12 Aug 2018 23:33:36 +0000 (00:33 +0100)]
dragon-nx-32: note bug to look at

6 years agoMerge pull request #651 from beretta42/coco2cart
EtchedPixels [Sat, 11 Aug 2018 17:07:06 +0000 (18:07 +0100)]
Merge pull request #651 from beretta42/coco2cart

some fixes for coco2cart SDC support

6 years agotrs80m1: only one interface is present
Alan Cox [Fri, 10 Aug 2018 23:54:11 +0000 (00:54 +0100)]
trs80m1: only one interface is present

6 years agotrs80m1: move platform_param into discard
Alan Cox [Fri, 10 Aug 2018 23:52:03 +0000 (00:52 +0100)]
trs80m1: move platform_param into discard

We don't need it after boot and we are going to add some options here soon

6 years agoz80fixedbank-banked: apply the same SP fix as to the main fixedbank code
Alan Cox [Fri, 10 Aug 2018 23:32:42 +0000 (00:32 +0100)]
z80fixedbank-banked: apply the same SP fix as to the main fixedbank code

6 years agodevide: save two bytes and a few clocks
Alan Cox [Fri, 10 Aug 2018 23:32:20 +0000 (00:32 +0100)]
devide: save two bytes and a few clocks

6 years agosam: update boot logic
Alan Cox [Fri, 10 Aug 2018 23:31:49 +0000 (00:31 +0100)]
sam: update boot logic

Thanks to the various Sam folks who explained how BOOT works