FUZIX.git
8 years agokernel.h: small tidy up of queue ifdeffery
Alan Cox [Mon, 19 Oct 2015 20:52:30 +0000 (21:52 +0100)]
kernel.h: small tidy up of queue ifdeffery

8 years agobrk: revert the MSP340 change to brk()
Alan Cox [Mon, 19 Oct 2015 20:48:41 +0000 (21:48 +0100)]
brk: revert the MSP340 change to brk()

brk sets the memory address to the one asked. If you misalign in then it's
your problem in userspace.

Some of our sbrk() users in userspace may well be wrong, but they need to be
fixed not brk()!

8 years agokernel.h: remove stdint.h
Alan Cox [Mon, 19 Oct 2015 20:40:23 +0000 (21:40 +0100)]
kernel.h: remove stdint.h

This was added by the msp340 port, but
- Not all our compilers have stdint.h
- The msp340 includes it from cpu.h anyway

8 years agoMerge pull request #262 from davidgiven/msp430
EtchedPixels [Mon, 19 Oct 2015 20:37:36 +0000 (21:37 +0100)]
Merge pull request #262 from davidgiven/msp430

MSP430 port

8 years agoUndo more unnecessary changes from upstream.
David Given [Mon, 19 Oct 2015 18:30:59 +0000 (20:30 +0200)]
Undo more unnecessary changes from upstream.

8 years agoBackport the ugetp/uputp changes from upstream.
David Given [Mon, 19 Oct 2015 18:19:35 +0000 (20:19 +0200)]
Backport the ugetp/uputp changes from upstream.

8 years agoDon't force alignment on platforms that don't need it.
David Given [Mon, 19 Oct 2015 17:56:23 +0000 (19:56 +0200)]
Don't force alignment on platforms that don't need it.

8 years agoFix some whitespace changes that shouldn't have been changed (for cleaner
David Given [Mon, 19 Oct 2015 17:50:44 +0000 (19:50 +0200)]
Fix some whitespace changes that shouldn't have been changed (for cleaner
diffs with upstream).

8 years agoMerge from master.
David Given [Mon, 19 Oct 2015 17:41:15 +0000 (19:41 +0200)]
Merge from master.

8 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Mon, 19 Oct 2015 10:52:08 +0000 (11:52 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

8 years agotrs80: add missed header file
Alan Cox [Mon, 19 Oct 2015 10:51:55 +0000 (11:51 +0100)]
trs80: add missed header file

8 years agoMerge pull request #261 from davidgiven/games
EtchedPixels [Mon, 19 Oct 2015 10:50:32 +0000 (11:50 +0100)]
Merge pull request #261 from davidgiven/games

Fix the games

8 years agoUpdate documentation to mention the MSP430.
David Given [Sun, 18 Oct 2015 20:17:11 +0000 (22:17 +0200)]
Update documentation to mention the MSP430.

8 years agoMove MSP430 README to the new Documentation directory.
David Given [Sun, 18 Oct 2015 20:13:32 +0000 (22:13 +0200)]
Move MSP430 README to the new Documentation directory.

8 years agoMerge from master.
David Given [Sun, 18 Oct 2015 17:53:52 +0000 (19:53 +0200)]
Merge from master.

8 years agoMerge pull request #259 from davidgiven/sh
EtchedPixels [Sun, 18 Oct 2015 12:49:35 +0000 (13:49 +0100)]
Merge pull request #259 from davidgiven/sh

sh now builds and runs on modern computers.

8 years agoBackgammon is small enough to fit now.
David Given [Sat, 17 Oct 2015 23:02:32 +0000 (01:02 +0200)]
Backgammon is small enough to fit now.

8 years agoReduce memory requirement; make sure buffers get flush properly before
David Given [Sat, 17 Oct 2015 23:02:22 +0000 (01:02 +0200)]
Reduce memory requirement; make sure buffers get flush properly before
waiting for the user; and remove the dependency on paper-based terminals.

8 years agoFlush stdout before getting the user's response (otherwise the user never
David Given [Sat, 17 Oct 2015 22:47:31 +0000 (00:47 +0200)]
Flush stdout before getting the user's response (otherwise the user never
sees anything).

8 years agoCleaned up the new kprintf a bit.
David Given [Sat, 17 Oct 2015 22:40:31 +0000 (00:40 +0200)]
Cleaned up the new kprintf a bit.

8 years agoReturn kputunum() to upstream's version.
David Given [Sat, 17 Oct 2015 22:33:46 +0000 (00:33 +0200)]
Return kputunum() to upstream's version.

8 years agoUpstream already got this fix, in a slightly different form. Use theirs.
David Given [Sat, 17 Oct 2015 22:28:33 +0000 (00:28 +0200)]
Upstream already got this fix, in a slightly different form. Use theirs.

8 years agoFix a whole bunch of show-stopping bugs --- how did this ever work?
David Given [Sat, 17 Oct 2015 22:10:19 +0000 (00:10 +0200)]
Fix a whole bunch of show-stopping bugs --- how did this ever work?

8 years agoFlush stdout before getting the user's response (otherwise the user never
David Given [Sat, 17 Oct 2015 22:47:31 +0000 (00:47 +0200)]
Flush stdout before getting the user's response (otherwise the user never
sees anything).

8 years agoReduce memory requirement; make sure buffers get flush properly before
David Given [Sat, 17 Oct 2015 23:02:22 +0000 (01:02 +0200)]
Reduce memory requirement; make sure buffers get flush properly before
waiting for the user; and remove the dependency on paper-based terminals.

8 years agoFix a whole bunch of show-stopping bugs --- how did this ever work?
David Given [Sat, 17 Oct 2015 22:10:19 +0000 (00:10 +0200)]
Fix a whole bunch of show-stopping bugs --- how did this ever work?

8 years agostaticify variable.
David Given [Sat, 17 Oct 2015 22:09:16 +0000 (00:09 +0200)]
staticify variable.

8 years agosh now builds and runs on modern computers.
David Given [Sat, 17 Oct 2015 22:09:04 +0000 (00:09 +0200)]
sh now builds and runs on modern computers.

8 years agosh now builds and runs on modern computers.
David Given [Sat, 17 Oct 2015 22:09:04 +0000 (00:09 +0200)]
sh now builds and runs on modern computers.

8 years agoEnsure that the break value is aligned.
David Given [Sat, 17 Oct 2015 21:26:49 +0000 (23:26 +0200)]
Ensure that the break value is aligned.

8 years agoAdded a quick and dirty MSP430 readme.
David Given [Thu, 15 Oct 2015 21:45:52 +0000 (23:45 +0200)]
Added a quick and dirty MSP430 readme.

8 years agoUpdate after changes.
David Given [Thu, 15 Oct 2015 21:07:16 +0000 (23:07 +0200)]
Update after changes.

8 years agokputunum() can now write the number 0.
David Given [Thu, 15 Oct 2015 21:06:57 +0000 (23:06 +0200)]
kputunum() can now write the number 0.

8 years agoDon't require EMAGIC and EMAGIC_2 to be defined. Align pointers correctly
David Given [Thu, 15 Oct 2015 21:04:18 +0000 (23:04 +0200)]
Don't require EMAGIC and EMAGIC_2 to be defined. Align pointers correctly
when writing an argument array.

8 years agoAdvance pointer correctly when doing block transfers.
David Given [Thu, 15 Oct 2015 21:03:20 +0000 (23:03 +0200)]
Advance pointer correctly when doing block transfers.

8 years agoMerge from master.
David Given [Thu, 15 Oct 2015 18:54:08 +0000 (20:54 +0200)]
Merge from master.

8 years agoMerge pull request #258 from beretta42/video
EtchedPixels [Wed, 14 Oct 2015 18:00:54 +0000 (19:00 +0100)]
Merge pull request #258 from beretta42/video

CoCo3: add first of low-level graphics

8 years agodragon-nx32: Some SPI fixes
Tormod Volden [Tue, 13 Oct 2015 16:03:58 +0000 (18:03 +0200)]
dragon-nx32: Some SPI fixes

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
8 years agococo3: compile usermem wrappers into common kernel/video area.
Brett Gordon [Tue, 13 Oct 2015 13:05:29 +0000 (09:05 -0400)]
coco3: compile usermem wrappers into common kernel/video area.

should be in official "common" area?

8 years agococo3: graphics: put uget's arguments in correct order.
Brett Gordon [Tue, 13 Oct 2015 13:02:53 +0000 (09:02 -0400)]
coco3: graphics: put uget's arguments in correct order.

8 years agococo3: connect graphic IOCTL to rendering routine.
Brett Gordon [Mon, 12 Oct 2015 12:58:28 +0000 (08:58 -0400)]
coco3: connect graphic IOCTL to rendering routine.

8 years agococo3: video: add exports.
Brett Gordon [Sat, 10 Oct 2015 11:18:32 +0000 (07:18 -0400)]
coco3: video: add exports.

8 years agococo3: fix typo
Brett Gordon [Fri, 9 Oct 2015 14:07:04 +0000 (10:07 -0400)]
coco3: fix typo

8 years agococo3: import of dragon's gfx code.
Brett Gordon [Fri, 9 Oct 2015 14:05:40 +0000 (10:05 -0400)]
coco3: import of dragon's gfx code.

8 years agouget() but direct to video memory
Brett Gordon [Fri, 9 Oct 2015 13:55:45 +0000 (09:55 -0400)]
uget() but direct to video memory

8 years agococo3: all graphics mode buffers start at 0x0000 in physical block 9
Brett Gordon [Fri, 9 Oct 2015 06:16:41 +0000 (02:16 -0400)]
coco3: all graphics mode buffers start at 0x0000 in physical block 9

8 years agoadd video mode register setting to private tty mode struct.
Brett Gordon [Fri, 9 Oct 2015 05:05:12 +0000 (01:05 -0400)]
add video mode register setting to private tty mode struct.

8 years agococo3: make detected hz a C global
Brett Gordon [Fri, 9 Oct 2015 05:03:09 +0000 (01:03 -0400)]
coco3: make detected hz a C global

8 years agococo3: add display basic graphics mode 256x192x2.
Brett Gordon [Fri, 9 Oct 2015 04:32:42 +0000 (00:32 -0400)]
coco3: add display basic graphics mode 256x192x2.

8 years agobuffers: enum is evil, use a uint8_t instead and save a byte a buffer
Alan Cox [Mon, 12 Oct 2015 22:20:10 +0000 (23:20 +0100)]
buffers: enum is evil, use a uint8_t instead and save a byte a buffer

520 is also a cheaper multiply on processors without mul instructions

8 years agols: fix one stupid performance bug
Alan Cox [Mon, 12 Oct 2015 22:17:52 +0000 (23:17 +0100)]
ls: fix one stupid performance bug

No point doing a stat on each node when we don't actually need it !

We should chdir into the directory before doing the stats on the short path.
That avoids all the name walking overhead and thrash. Likewise it might be
sensible to stat in inode order and batched, but that may cost more than
the saving !

8 years agodragon-nx-32: use the new "reclaim discard as buffer cache feature"
Alan Cox [Mon, 12 Oct 2015 22:01:34 +0000 (23:01 +0100)]
dragon-nx-32: use the new "reclaim discard as buffer cache feature"

This gets me another 7 buffers on my build.

8 years agobuffers: Allow for the buffer cache to be expandable.
Alan Cox [Mon, 12 Oct 2015 21:58:27 +0000 (22:58 +0100)]
buffers: Allow for the buffer cache to be expandable.

Some of our platforms have no userspace mapped when in kernel space. That
prevents them putting the discard code/data into the userspace area during
boot and binning it when loading init over the top.

Instead we allow the buffer cache to grow. The platform can then put the
buffer cache just before the discard area, and once the root fs is mounted
and we are ready to load init we can convert the entire discard area into
cache pages.

Even better we only need enough buffers to mount the root fs to be present
at boot time (2 or 3).

8 years agotc3: add selection logic (untested)
Alan Cox [Sat, 10 Oct 2015 20:51:40 +0000 (21:51 +0100)]
tc3: add selection logic (untested)

8 years agodragon-nx-32: make detection prettier, add HDBDOS/TC3 sigs
Alan Cox [Sat, 10 Oct 2015 20:51:14 +0000 (21:51 +0100)]
dragon-nx-32: make detection prettier, add HDBDOS/TC3 sigs

8 years agodragon-nx-32: record the slot of the TC3 SCSI if present
Alan Cox [Sat, 10 Oct 2015 20:49:35 +0000 (21:49 +0100)]
dragon-nx-32: record the slot of the TC3 SCSI if present

8 years agodevscsi: introduce a deselect
Alan Cox [Sat, 10 Oct 2015 20:48:52 +0000 (21:48 +0100)]
devscsi: introduce a deselect

Needed for things like MPI or bank switched cartridges containing MMIO
controllers (MSX as well I suspect)

8 years agodragon-nx-32: turn on tc3 probing logic and fix tc3 bugs
Alan Cox [Sat, 10 Oct 2015 20:12:21 +0000 (21:12 +0100)]
dragon-nx-32: turn on tc3 probing logic and fix tc3 bugs

B is the 8bit return
Remove bogus push of pc in the cmd write

8 years agodevscsi: keep naming of probe code akin to IDE
Alan Cox [Sat, 10 Oct 2015 20:12:01 +0000 (21:12 +0100)]
devscsi: keep naming of probe code akin to IDE

8 years agodragon-nx32: add first test bits of scsi support
Alan Cox [Sat, 10 Oct 2015 19:49:59 +0000 (20:49 +0100)]
dragon-nx32: add first test bits of scsi support

We now scan 0xFF7x for a TC3 controller and maybe even probe it properly but
not yet tested out.

Also sort out the discard segment properly. Right now it's not important but
at some point we'll find a way to reuse that space nicely.

Still lots to do including the proper autodetect for the TC3 and bank
switching the TC3 in/out if (as it basically has to be) it's in an MPI, and
handling swap or userspace I/O (so even running programs off it won't work
yet in the unlikely event it gets that far)

8 years agodev: add first draft of the SCSI layer
Alan Cox [Sat, 10 Oct 2015 19:49:28 +0000 (20:49 +0100)]
dev: add first draft of the SCSI layer

Still working on an xroar emulation of the tc3 to debug test this

8 years ago6809: move data into discard for discard code
Alan Cox [Sat, 10 Oct 2015 19:49:05 +0000 (20:49 +0100)]
6809: move data into discard for discard code

8 years agodisk: add ioctl def for raw commands
Alan Cox [Sat, 10 Oct 2015 19:47:30 +0000 (20:47 +0100)]
disk: add ioctl def for raw commands

8 years agodragon-nx-32: fix build error
Alan Cox [Sat, 10 Oct 2015 19:22:08 +0000 (20:22 +0100)]
dragon-nx-32: fix build error

ide_select changed slightly midstream and I forgot to backport this

8 years agozx128: platform_ide.h
Alan Cox [Fri, 9 Oct 2015 15:18:17 +0000 (16:18 +0100)]
zx128: platform_ide.h

8 years agozeta_v2: platform_ide
Alan Cox [Fri, 9 Oct 2015 15:13:44 +0000 (16:13 +0100)]
zeta_v2: platform_ide

8 years agop112: platform_ide.h
Alan Cox [Fri, 9 Oct 2015 15:13:33 +0000 (16:13 +0100)]
p112: platform_ide.h

8 years agococo3: remove now duplicated defines
Alan Cox [Fri, 9 Oct 2015 13:37:07 +0000 (14:37 +0100)]
coco3: remove now duplicated defines

8 years agon8vem-mark4: platform_ide.h
Alan Cox [Fri, 9 Oct 2015 13:36:53 +0000 (14:36 +0100)]
n8vem-mark4: platform_ide.h

8 years agococo3: platform_ide.h
Alan Cox [Fri, 9 Oct 2015 13:30:03 +0000 (14:30 +0100)]
coco3: platform_ide.h

8 years agodevide: allow for ide_select/deselect being null defines
Alan Cox [Fri, 9 Oct 2015 13:29:26 +0000 (14:29 +0100)]
devide: allow for ide_select/deselect being null defines

8 years agodragon-nx-32: wire up the probing and mpi logic
Alan Cox [Fri, 9 Oct 2015 13:23:11 +0000 (14:23 +0100)]
dragon-nx-32: wire up the probing and mpi logic

First cut at this.

We make the IDE base a variable
Allow for a platform private header for IDE (needed for stuff like ide_base)
Issue select/deselect commands passing the drive number

This in theory also gives us all that is needed for multiple IDE controllers,
while not paying a cost for them on simple platforms (they can define the
selectors into nothingness)

8 years agodragon-nx-32: add a new platform_ide file
Alan Cox [Fri, 9 Oct 2015 13:22:35 +0000 (14:22 +0100)]
dragon-nx-32: add a new platform_ide file

8 years agodragon-nx-32: save mmio addresses probed from cartridges
Alan Cox [Fri, 9 Oct 2015 13:21:50 +0000 (14:21 +0100)]
dragon-nx-32: save mmio addresses probed from cartridges

8 years agodragon-nx-32: add autoprobe of HDBDOS
Alan Cox [Thu, 8 Oct 2015 22:15:55 +0000 (23:15 +0100)]
dragon-nx-32: add autoprobe of HDBDOS

We now identify the HDBDOS ROM by the signature, and then pull out the MMIO
port, SCSI LUN and identify the controller type so that we can set the
cartridge type nicely.

Do need to move most of main.c into discard as its getting a bit big, but it's
all discardable so that's fine.

8 years agodragon-nx-32: tighten MPI detection
Alan Cox [Thu, 8 Oct 2015 19:55:58 +0000 (20:55 +0100)]
dragon-nx-32: tighten MPI detection

8 years agoMerge pull request #257 from beretta42/video1
EtchedPixels [Thu, 8 Oct 2015 19:27:05 +0000 (20:27 +0100)]
Merge pull request #257 from beretta42/video1

coco3: more getting ready

8 years agococo3: add video init function.
Brett Gordon [Thu, 8 Oct 2015 18:35:55 +0000 (14:35 -0400)]
coco3: add video init function.

8 years agococo3: fix EOF whitespace.
Brett Gordon [Thu, 8 Oct 2015 18:27:45 +0000 (14:27 -0400)]
coco3: fix EOF whitespace.

8 years agococo3: we duplicated these in assembler, do delete!
Brett Gordon [Thu, 8 Oct 2015 18:22:23 +0000 (14:22 -0400)]
coco3: we duplicated these in assembler, do delete!

8 years agococo3: compile new low-level video source.
Brett Gordon [Thu, 8 Oct 2015 18:21:34 +0000 (14:21 -0400)]
coco3: compile new low-level video source.

8 years agococo3: Add assembler source for even lower calls
Brett Gordon [Thu, 8 Oct 2015 18:20:44 +0000 (14:20 -0400)]
coco3: Add assembler source for even lower calls

8 years agococo3: separate low-level video methods into separate source file.
Brett Gordon [Thu, 8 Oct 2015 18:19:14 +0000 (14:19 -0400)]
coco3: separate low-level video methods into separate source file.

8 years agodragon-nx-32: example (hopefully correct) of a GFIOC_WAITVB
Alan Cox [Thu, 8 Oct 2015 16:33:27 +0000 (17:33 +0100)]
dragon-nx-32: example (hopefully correct) of a GFIOC_WAITVB

8 years agoadd .videodata section, add defines for video sections in devtty.c
Brett Gordon [Thu, 8 Oct 2015 15:55:22 +0000 (11:55 -0400)]
add .videodata section, add defines for video sections in devtty.c

8 years agodragon-nx-32: and remember to commit the fixes
Alan Cox [Thu, 8 Oct 2015 15:33:02 +0000 (16:33 +0100)]
dragon-nx-32: and remember to commit the fixes

8 years agodragon-nx32: tty updates
Alan Cox [Thu, 8 Oct 2015 15:31:26 +0000 (16:31 +0100)]
dragon-nx32: tty updates

Remove di/irqrestore
Advertise GFX commands we now support
Serial port baud rate setting etc

8 years agococo2: update devtty code for new irq, also remove bogus attrs
Alan Cox [Thu, 8 Oct 2015 15:31:04 +0000 (16:31 +0100)]
coco2: update devtty code for new irq, also remove bogus attrs

8 years agovt: try and do something sane about vt and irq handling
Alan Cox [Thu, 8 Oct 2015 15:29:58 +0000 (16:29 +0100)]
vt: try and do something sane about vt and irq handling

8 years agococo3: tty: don't add page 8 to freelist; It's video ram now
Brett Gordon [Thu, 8 Oct 2015 12:20:47 +0000 (08:20 -0400)]
coco3: tty: don't add page 8 to freelist; It's video ram now

8 years agococo3: tty: repurpose .video section for code, put in lower mem.
Brett Gordon [Thu, 8 Oct 2015 11:40:56 +0000 (07:40 -0400)]
coco3: tty: repurpose .video section for code, put in lower mem.

8 years agodragon-nx-32: Fix typo
Alan Cox [Thu, 8 Oct 2015 14:47:38 +0000 (15:47 +0100)]
dragon-nx-32: Fix typo

8 years agolibs: Add explicit rules for tools Makefile
Alan Cox [Thu, 8 Oct 2015 14:34:41 +0000 (15:34 +0100)]
libs: Add explicit rules for tools Makefile

Otherwise we pass the .h file to the compiler as an argument. GNU C compilers
understand what is desired but clang not unreasonably errors it.

8 years agococo3: remove a bogus "static"
Alan Cox [Wed, 7 Oct 2015 20:37:44 +0000 (21:37 +0100)]
coco3: remove a bogus "static"

8 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Wed, 7 Oct 2015 20:37:20 +0000 (21:37 +0100)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

8 years agococo3: allow normal tty ioctls on drivewire
Alan Cox [Wed, 7 Oct 2015 20:33:49 +0000 (21:33 +0100)]
coco3: allow normal tty ioctls on drivewire

I'll leave it to Brett to write graphics mode changing and routines to convert
GFX_DRAW and friends into OS/9 escape sequences 8)

8 years agoMerge pull request #255 from beretta42/graph2_sub
EtchedPixels [Wed, 7 Oct 2015 20:31:30 +0000 (21:31 +0100)]
Merge pull request #255 from beretta42/graph2_sub

coco3: easy fixes

8 years agococo2: add the bits needed to convert the decb
Alan Cox [Wed, 7 Oct 2015 20:26:45 +0000 (21:26 +0100)]
coco2: add the bits needed to convert the decb

Turn it into a binary memory image, then apply shuffle the high 4K so the loader
unpacks it off the disk image properly.

8 years agococo3: tty: correct EINVAL/ENOTTY logic.
Brett Gordon [Wed, 7 Oct 2015 20:00:20 +0000 (16:00 -0400)]
coco3: tty: correct EINVAL/ENOTTY logic.

8 years agococo3: tty: correct ioctl error return
Brett Gordon [Wed, 7 Oct 2015 18:37:05 +0000 (14:37 -0400)]
coco3: tty: correct ioctl error return