FUZIX.git
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

8 years agococo3: tty: be more pendantic.
Brett Gordon [Wed, 7 Oct 2015 18:36:19 +0000 (14:36 -0400)]
coco3: tty: be more pendantic.

8 years agoMerge pull request #254 from beretta42/graph1_sub
EtchedPixels [Wed, 7 Oct 2015 17:09:10 +0000 (18:09 +0100)]
Merge pull request #254 from beretta42/graph1_sub

Graphics for COCO3

8 years agococo3: tty: adjust buffer address to accomodate 25 lines.
Brett Gordon [Wed, 7 Oct 2015 15:40:21 +0000 (11:40 -0400)]
coco3: tty: adjust buffer address to accomodate 25 lines.

8 years agococo3: tty: typos.
Brett Gordon [Wed, 7 Oct 2015 15:31:12 +0000 (11:31 -0400)]
coco3: tty: typos.

8 years agococo3: tty: add getting/setting graphics mode to ioctl.
Brett Gordon [Wed, 7 Oct 2015 15:29:24 +0000 (11:29 -0400)]
coco3: tty: add getting/setting graphics mode to ioctl.

8 years agococo3: tty: factor out gime video mode switching.
Brett Gordon [Wed, 7 Oct 2015 15:24:07 +0000 (11:24 -0400)]
coco3: tty: factor out gime video mode switching.

8 years agococo3: tty: make initialized data match linked fmodes, e.i.
Brett Gordon [Wed, 7 Oct 2015 15:18:56 +0000 (11:18 -0400)]
coco3: tty: make initialized data match linked fmodes, e.i.
vt's are now 25 rows.

8 years agococo3: tty: Connect internal mode struct with kernel's mode struct
Brett Gordon [Wed, 7 Oct 2015 15:09:24 +0000 (11:09 -0400)]
coco3: tty: Connect internal mode struct with kernel's mode struct

8 years agococo3: tty: flesh out a array of supported modes.
Brett Gordon [Wed, 7 Oct 2015 15:02:33 +0000 (11:02 -0400)]
coco3: tty: flesh out a array of supported modes.

8 years agococo3: devtty: This definition moved to devtty.h.
Brett Gordon [Wed, 7 Oct 2015 14:55:51 +0000 (10:55 -0400)]
coco3: devtty: This definition moved to devtty.h.

8 years agoadd a reference to a fuzix display mode struct in our per-tty struct.
Brett Gordon [Wed, 7 Oct 2015 14:53:00 +0000 (10:53 -0400)]
add a reference to a fuzix display mode struct in our per-tty struct.

8 years agococo3: tty: clear a bit more memory for 25 rows.
Brett Gordon [Wed, 7 Oct 2015 14:50:12 +0000 (10:50 -0400)]
coco3: tty: clear a bit more memory for 25 rows.

8 years agocorrect comments
Brett Gordon [Tue, 6 Oct 2015 23:39:12 +0000 (19:39 -0400)]
correct comments

8 years agoundid putchar real function thing...
Brett Gordon [Sun, 19 Jul 2015 20:22:44 +0000 (16:22 -0400)]
undid putchar real function thing...

8 years agococo3: add mode util to copy script
Brett Gordon [Sun, 4 Oct 2015 14:12:26 +0000 (10:12 -0400)]
coco3: add mode util to copy script

8 years agococo3: keep up with changes in graphics.h
Brett Gordon [Sun, 4 Oct 2015 14:12:02 +0000 (10:12 -0400)]
coco3: keep up with changes in graphics.h

8 years agococo2: first cut at bootloader
Alan Cox [Tue, 6 Oct 2015 20:50:01 +0000 (21:50 +0100)]
coco2: first cut at bootloader

8 years agonc100: draw in the right location
Alan Cox [Mon, 5 Oct 2015 12:43:30 +0000 (13:43 +0100)]
nc100: draw in the right location

8 years agotrs80: trivial tidy up
Alan Cox [Mon, 5 Oct 2015 12:43:21 +0000 (13:43 +0100)]
trs80: trivial tidy up

8 years agodragon-nx32: first cut at adding draw/read/write methods
Alan Cox [Sun, 4 Oct 2015 21:16:02 +0000 (22:16 +0100)]
dragon-nx32: first cut at adding draw/read/write methods

Strictly speaking we don't need them, but this probably won't be true on all
the 6809 variants (eg COCO3) so we should support them to make portable code
easier. It's not as if they are very much code space.

8 years agographics: text mode tidy up
Alan Cox [Sun, 4 Oct 2015 13:07:03 +0000 (14:07 +0100)]
graphics: text mode tidy up

Now we have text modes as modes we can get rid of GFX_ENABLE stuff

8 years agodragon-nx-32: Add 128x192 four colour mode graphics
Alan Cox [Sat, 3 Oct 2015 18:54:19 +0000 (19:54 +0100)]
dragon-nx-32: Add 128x192 four colour mode graphics

Yay real graphics mode changes

Now should they clear the screen or not ...

8 years agomode: report text modes
Alan Cox [Sat, 3 Oct 2015 15:59:48 +0000 (16:59 +0100)]
mode: report text modes

8 years agographics: add 'text only' mode type
Alan Cox [Sat, 3 Oct 2015 15:57:07 +0000 (16:57 +0100)]
graphics: add 'text only' mode type

We need this so we can describe modes for 40/80 switching, or moving from a
graphics to a text mode

8 years agoutils: add a "mode" command for mode setting
Alan Cox [Sat, 3 Oct 2015 15:54:01 +0000 (16:54 +0100)]
utils: add a "mode" command for mode setting

Well it had to be called "mode" for an 8bit box 8)

Also fix the header up

8 years agodragon-nx32: implement initial "mode" choices
Alan Cox [Sat, 3 Oct 2015 15:52:59 +0000 (16:52 +0100)]
dragon-nx32: implement initial "mode" choices

Ok so in reality its the same mode and two colour sets - but it'll do nicely
for testing !

8 years agodragon-nx-32: first test bits for mode switching
Alan Cox [Sat, 3 Oct 2015 13:15:39 +0000 (14:15 +0100)]
dragon-nx-32: first test bits for mode switching

8 years agographics: add header for apps
Alan Cox [Sat, 3 Oct 2015 13:06:56 +0000 (14:06 +0100)]
graphics: add header for apps

8 years agotrs80: update devgfx test code
Alan Cox [Sat, 3 Oct 2015 10:03:03 +0000 (11:03 +0100)]
trs80: update devgfx test code

Correct for 16bit co-ordinates
Add GFX_READ/WRITE test implementation

8 years agonc100: update test graphics code
Alan Cox [Sat, 3 Oct 2015 10:01:30 +0000 (11:01 +0100)]
nc100: update test graphics code

Add mode number
X and Y need to be 16bit

8 years agographics: put mode number in info, otherwise you can't query the mode number
Alan Cox [Sat, 3 Oct 2015 10:00:33 +0000 (11:00 +0100)]
graphics: put mode number in info, otherwise you can't query the mode number

8 years agoGraphics: more pondering
Alan Cox [Sat, 3 Oct 2015 10:00:19 +0000 (11:00 +0100)]
Graphics: more pondering

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

8 years agotrs80: update for gfx changes
Alan Cox [Fri, 2 Oct 2015 20:00:47 +0000 (21:00 +0100)]
trs80: update for gfx changes

8 years agonc100: clean up devgfx changes
Alan Cox [Fri, 2 Oct 2015 20:00:37 +0000 (21:00 +0100)]
nc100: clean up devgfx changes

8 years agographics: Have a rethink
Alan Cox [Fri, 2 Oct 2015 19:37:53 +0000 (20:37 +0100)]
graphics: Have a rethink

Basically replace all the operations with a single tight kernel operation which
can be used to construct them all with reasonable efficiency, and is good at
certain useful things. Push all the alignment considerations onto the user
code so that everyone doesn't have the time and size penalties for it when
they don't care.

Redo the NC100 to follow this implementation.

trs80 needs redoing yet but it will take the trs80 hires graphics from
unbearable to slow 8)

8 years agoMerge pull request #250 from beretta42/graphics
EtchedPixels [Fri, 2 Oct 2015 16:49:58 +0000 (17:49 +0100)]
Merge pull request #250 from beretta42/graphics

coco3: add gfx ioctl.

8 years agoMerge pull request #249 from beretta42/back-tick
EtchedPixels [Fri, 2 Oct 2015 16:48:52 +0000 (17:48 +0100)]
Merge pull request #249 from beretta42/back-tick

coco3: keyboard does `, console displays as UP_ARROW.