FUZIX.git
6 years agostartrek: more cleaning/sizing
Alan Cox [Mon, 12 Mar 2018 00:37:55 +0000 (00:37 +0000)]
startrek: more cleaning/sizing

6 years agostartrek: make stardates fixed point
Alan Cox [Mon, 12 Mar 2018 00:11:12 +0000 (00:11 +0000)]
startrek: make stardates fixed point

6 years agostartrek:tidy up scratch string usage in device and quad names
Alan Cox [Sun, 11 Mar 2018 22:15:44 +0000 (22:15 +0000)]
startrek:tidy up scratch string usage in device and quad names

6 years agostartrek: chdir somewhere, make it all static and remove dead bits
Alan Cox [Sun, 11 Mar 2018 22:08:42 +0000 (22:08 +0000)]
startrek: chdir somewhere, make it all static and remove dead bits

6 years agostartrek: instructions
Alan Cox [Sun, 11 Mar 2018 21:57:51 +0000 (21:57 +0000)]
startrek: instructions

6 years agostartrek: some clean up first pass
Alan Cox [Sun, 11 Mar 2018 21:57:30 +0000 (21:57 +0000)]
startrek: some clean up first pass

6 years agostartrek: use time(NULL)
Alan Cox [Sun, 11 Mar 2018 20:57:49 +0000 (20:57 +0000)]
startrek: use time(NULL)

6 years agolimits: move RAND_MAX to the right spot
Alan Cox [Sun, 11 Mar 2018 20:57:21 +0000 (20:57 +0000)]
limits: move RAND_MAX to the right spot

6 years agoResolving merge
Alan Cox [Sun, 11 Mar 2018 17:26:39 +0000 (17:26 +0000)]
Resolving merge

6 years agoAllow building without IDE or SCSI support
Tormod Volden [Sun, 11 Mar 2018 15:00:58 +0000 (16:00 +0100)]
Allow building without IDE or SCSI support

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agococo3: Const'ify strcmp arguments
Tormod Volden [Sun, 11 Mar 2018 14:37:00 +0000 (15:37 +0100)]
coco3: Const'ify strcmp arguments

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoCommon DriveWire files for coco2/coco2cart/dragon-nx32
Tormod Volden [Sun, 11 Mar 2018 13:38:19 +0000 (14:38 +0100)]
Common DriveWire files for coco2/coco2cart/dragon-nx32

The coco2 and coco2cart platforms were missing the
low-level DriveWire drivers. They can use the same as
the dragon-nx32 platform, so make them common.

Now that coco2 and coco2cart build again, also add
the build memory map check while we are at it.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoflat: note bug
Alan Cox [Sun, 11 Mar 2018 14:12:07 +0000 (14:12 +0000)]
flat: note bug

6 years agostartrek: make sdcc happier
Alan Cox [Sun, 11 Mar 2018 14:02:40 +0000 (14:02 +0000)]
startrek: make sdcc happier

sdcc does weird stuff with static objects constructed inside a function. No
idea why - but it's best to keep them outside of it

6 years agofindsdcc: fix paths
Alan Cox [Sun, 11 Mar 2018 14:02:07 +0000 (14:02 +0000)]
findsdcc: fix paths

6 years agosyscall_exec16: Fix L2 build without locking
Alan Cox [Sun, 11 Mar 2018 14:01:21 +0000 (14:01 +0000)]
syscall_exec16: Fix L2 build without locking

6 years agostartrek: fix typo
Alan Cox [Sun, 11 Mar 2018 13:18:43 +0000 (13:18 +0000)]
startrek: fix typo

6 years agostartrek: feed through indent
Alan Cox [Sun, 11 Mar 2018 13:09:13 +0000 (13:09 +0000)]
startrek: feed through indent

No other changes

6 years agoMerge pull request #596 from beretta42/vile
EtchedPixels [Sun, 11 Mar 2018 12:59:50 +0000 (12:59 +0000)]
Merge pull request #596 from beretta42/vile

vile: add to package script

6 years agoMerge pull request #597 from beretta42/vile2
EtchedPixels [Sun, 11 Mar 2018 12:59:34 +0000 (12:59 +0000)]
Merge pull request #597 from beretta42/vile2

curses: tailor tty VMIN to FUZIX

6 years agoMerge pull request #595 from beretta42/strcmp
EtchedPixels [Sun, 11 Mar 2018 12:59:06 +0000 (12:59 +0000)]
Merge pull request #595 from beretta42/strcmp

coco3: fix strcmp definition

6 years agovile: add to package script
Brett Gordon [Sun, 11 Mar 2018 06:32:31 +0000 (01:32 -0500)]
vile: add to package script

6 years agocurses: tailor tty VMIN to FUZIX
Brett Gordon [Sun, 11 Mar 2018 06:24:07 +0000 (01:24 -0500)]
curses: tailor tty VMIN to FUZIX

VMIN and VEOF are unioned in FUZIX, so reset VMIN to 0 on raw(),
otherwise set it to EOF (4).

6 years agococo3: fix strcmp definition
Brett Gordon [Sun, 11 Mar 2018 04:04:25 +0000 (23:04 -0500)]
coco3: fix strcmp definition

6 years agodragon-nx32: Only init IDE or SD devices if set in config.h
Tormod Volden [Sat, 10 Mar 2018 22:40:47 +0000 (23:40 +0100)]
dragon-nx32: Only init IDE or SD devices if set in config.h

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx32: Default to "real" DriveWire (bit-banger not Becker port)
Tormod Volden [Sat, 10 Mar 2018 22:17:10 +0000 (23:17 +0100)]
dragon-nx32: Default to "real" DriveWire (bit-banger not Becker port)

Pass on BECKER from Make environment instead, so that it can be defined
on the command line without changing the code:

make -C Kernel TARGET=dragon-nx32 BECKER=1

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx32: SPI fast sector read: Initiate bit shifting after FRX enable
Tormod Volden [Sat, 10 Mar 2018 22:17:09 +0000 (23:17 +0100)]
dragon-nx32: SPI fast sector read: Initiate bit shifting after FRX enable

In the fast receive mode (FRX) of the 65SPI interface a read of
the data register triggers reading in the next byte over SPI. So
after going into this mode the first read will return the value
that was already there, before shifting in of the new value ensues.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoRemove spurious control character in varargs.h
Tormod Volden [Sat, 10 Mar 2018 22:17:08 +0000 (23:17 +0100)]
Remove spurious control character in varargs.h

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodevsd_discard.c: Fix link to ChaN's flow chart
Tormod Volden [Tue, 27 Feb 2018 21:18:47 +0000 (22:18 +0100)]
devsd_discard.c: Fix link to ChaN's flow chart

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx-32: resolve Makefile merge failure in previous
Alan Cox [Sat, 10 Mar 2018 23:57:13 +0000 (23:57 +0000)]
dragon-nx-32: resolve Makefile merge failure in previous

6 years agoAdd GUID Partition Table support
Tormod Volden [Fri, 23 Feb 2018 21:31:26 +0000 (22:31 +0100)]
Add GUID Partition Table support

And enable it on dragon-nx32.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoAdd userspace GPT parser
Tormod Volden [Fri, 23 Feb 2018 21:31:28 +0000 (22:31 +0100)]
Add userspace GPT parser

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoAdd library header files for partition tables
Tormod Volden [Fri, 23 Feb 2018 21:31:27 +0000 (22:31 +0100)]
Add library header files for partition tables

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agodragon-nx32: Add strcmp()
Tormod Volden [Fri, 23 Feb 2018 21:31:25 +0000 (22:31 +0100)]
dragon-nx32: Add strcmp()

Also add prototype to 6809 header file.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years agoAdd %2x support to kprintf
Tormod Volden [Fri, 23 Feb 2018 21:31:24 +0000 (22:31 +0100)]
Add %2x support to kprintf

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
6 years ago68000: build vile
Alan Cox [Sat, 10 Mar 2018 21:43:34 +0000 (21:43 +0000)]
68000: build vile

6 years agovile: add d and c functionality
Alan Cox [Sat, 10 Mar 2018 21:43:23 +0000 (21:43 +0000)]
vile: add d and c functionality

6 years ago68000: add more app makefiles
Alan Cox [Fri, 9 Mar 2018 21:31:15 +0000 (21:31 +0000)]
68000: add more app makefiles

6 years ago68000: update some Makefiles
Alan Cox [Fri, 9 Mar 2018 21:30:25 +0000 (21:30 +0000)]
68000: update some Makefiles

6 years ago68000: Library makefiles
Alan Cox [Fri, 9 Mar 2018 21:29:23 +0000 (21:29 +0000)]
68000: Library makefiles

6 years agomalloc: tidy formatting to match core code standard
Alan Cox [Fri, 9 Mar 2018 20:56:16 +0000 (20:56 +0000)]
malloc: tidy formatting to match core code standard

6 years agovile: add some of the needed bits for modify tracking etc
Alan Cox [Fri, 9 Mar 2018 18:07:55 +0000 (18:07 +0000)]
vile: add some of the needed bits for modify tracking etc

Plus some other msall fixups

6 years agovile: hook into build
Alan Cox [Fri, 9 Mar 2018 14:23:44 +0000 (14:23 +0000)]
vile: hook into build

Until we get rid of curses it's a bit large

6 years ago6809: update rules to build startrek FP
Alan Cox [Mon, 5 Mar 2018 20:31:18 +0000 (20:31 +0000)]
6809: update rules to build startrek FP

No idea of it works yet but it does now build

6 years ago6809: Update the library build
Alan Cox [Mon, 5 Mar 2018 20:29:55 +0000 (20:29 +0000)]
6809: Update the library build

Build a libm and don't confuse with libc
Build the double libary (or most of it)

6 years agosqrt: fix SNaN
Alan Cox [Mon, 5 Mar 2018 20:29:00 +0000 (20:29 +0000)]
sqrt: fix SNaN

6 years agoround: fix types for shifts
Alan Cox [Mon, 5 Mar 2018 20:28:36 +0000 (20:28 +0000)]
round: fix types for shifts

6 years agomodf: replace MUSL version with Sun one for portability
Alan Cox [Mon, 5 Mar 2018 20:28:05 +0000 (20:28 +0000)]
modf: replace MUSL version with Sun one for portability

6 years agofrexp: replace MUSL with Sun version for portability
Alan Cox [Mon, 5 Mar 2018 20:27:47 +0000 (20:27 +0000)]
frexp: replace MUSL with Sun version for portability

6 years agofabs: make friendly with non uint64_t
Alan Cox [Mon, 5 Mar 2018 20:27:07 +0000 (20:27 +0000)]
fabs: make friendly with non uint64_t

6 years agoexpm1: remove old STRICT_ASSIGN macro
Alan Cox [Mon, 5 Mar 2018 20:26:54 +0000 (20:26 +0000)]
expm1: remove old STRICT_ASSIGN macro

6 years agocopysign: make it friendly to non 64bit capable platforms
Alan Cox [Mon, 5 Mar 2018 20:26:26 +0000 (20:26 +0000)]
copysign: make it friendly to non 64bit capable platforms

6 years agocbrt: make it friendly with non 64bit capable
Alan Cox [Mon, 5 Mar 2018 20:26:05 +0000 (20:26 +0000)]
cbrt: make it friendly with non 64bit capable

6 years agoatanh: fix build
Alan Cox [Mon, 5 Mar 2018 20:25:58 +0000 (20:25 +0000)]
atanh: fix build

6 years agofpclassify: rewrite in terms of macros
Alan Cox [Mon, 5 Mar 2018 20:24:48 +0000 (20:24 +0000)]
fpclassify: rewrite in terms of macros

6 years agomath,h: Fix mismatched atof declaration
Alan Cox [Mon, 5 Mar 2018 20:24:30 +0000 (20:24 +0000)]
math,h: Fix mismatched atof declaration

6 years agorename: fix leak I hope
Alan Cox [Mon, 5 Mar 2018 19:29:47 +0000 (19:29 +0000)]
rename: fix leak I hope

Rename needs some more thinking about

6 years agovile: further design note
Alan Cox [Mon, 5 Mar 2018 19:29:21 +0000 (19:29 +0000)]
vile: further design note

6 years agoMerge pull request #592 from k0gaMSX/master
EtchedPixels [Mon, 5 Mar 2018 18:47:38 +0000 (18:47 +0000)]
Merge pull request #592 from k0gaMSX/master

Improve msx2 port

6 years agokernel: Initialize dirty and time flags of bb
Roberto E. Vargas Caballero [Mon, 26 Feb 2018 18:54:35 +0000 (18:54 +0000)]
kernel: Initialize dirty and time flags of bb

The buffer cache is not located in bss in some configurations,
and it means that the memory is not initialized when the system
boots. When emulators allocate the memory, it is initialized
to 0 by the operating system, but it doesn't happen in actual
hardware.

6 years agostart: Avoid infinite loop when BOOTDEVICE is defined
Roberto E. Vargas Caballero [Tue, 13 Feb 2018 22:22:52 +0000 (22:22 +0000)]
start: Avoid infinite loop when BOOTDEVICE is defined

When BOOTDEVICE is defined get_root_dev() was always returning
the same device entering in an infinite loop with the only
effect of scroll out all the previous messages.

6 years agomsx2: Use DEVTTY for kernel messages
Roberto E. Vargas Caballero [Tue, 13 Feb 2018 22:18:28 +0000 (22:18 +0000)]
msx2: Use DEVTTY for kernel messages

Commit 3616d6d added support for multiple vt in msx2,
but in the process it changed the console to the debug
port of openmsx. Since this is not a device present in
actual computers, any error in the boot process was
silently ignored. This patch reverts the console to
TTYDEV and at the same time it prints all the messages
to the debug port of openmsx.

6 years agoMake the Makefiles more portable
Roberto E. Vargas Caballero [Sun, 11 Feb 2018 22:07:53 +0000 (22:07 +0000)]
Make the Makefiles more portable

- BSD make doesn't support the GNU extensions, and in that
systems the GNU make is called gmake. Seeting the value of
MAKE directly to make break the compilation in that systems.

- In the same way, in BSD systems yacc is not aliased to byacc,
and that explicit rule is not needed at all because POSIX
make already has a default rule to generate c files from y
files.

6 years agobinfmt: update notes on plans
Alan Cox [Sun, 25 Feb 2018 19:42:33 +0000 (19:42 +0000)]
binfmt: update notes on plans

6 years agofweep: more tidying
Alan Cox [Sun, 25 Feb 2018 18:49:21 +0000 (18:49 +0000)]
fweep: more tidying

6 years agoMerge pull request #591 from beretta42/nop-explain
EtchedPixels [Sun, 25 Feb 2018 18:48:44 +0000 (18:48 +0000)]
Merge pull request #591 from beretta42/nop-explain

Explain reason for NOPs in SD driver

6 years agolibm,6809: add a helper set for the double ops we can't inline
Alan Cox [Sun, 25 Feb 2018 18:46:33 +0000 (18:46 +0000)]
libm,6809: add a helper set for the double ops we can't inline

6 years agolibm: 6809 now handles double as well as float
Alan Cox [Sun, 25 Feb 2018 18:37:09 +0000 (18:37 +0000)]
libm: 6809 now handles double as well as float

Need to write a few small extra helpers to match the inline ones using uint64_t

6 years ago6809: build libm (sort of)
Alan Cox [Sun, 25 Feb 2018 17:29:42 +0000 (17:29 +0000)]
6809: build libm (sort of)

There are some outstanding problems to fix

- We only build for float, but the C type promotion rules at this point then
  mess us up and turn the float into a double for varargs (blame the C spec)
- Several things use __NaN but that breaks on 6809 really and now we've got
  SDCC fixed we can probably switch to using 0/0 etc as we did before.

6 years agoExplain reason for NOPs in SD driver
Brett Gordon [Sun, 25 Feb 2018 14:25:38 +0000 (09:25 -0500)]
Explain reason for NOPs in SD driver

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Sun, 25 Feb 2018 00:57:44 +0000 (00:57 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agogames: update Makefiles
Alan Cox [Sun, 25 Feb 2018 00:57:35 +0000 (00:57 +0000)]
games: update Makefiles

6 years agofweep: tidying
Alan Cox [Sun, 25 Feb 2018 00:45:57 +0000 (00:45 +0000)]
fweep: tidying

- 16bit for writes
- trim text buffer to a sane size
- formatting glitches
- fix up alpha in a way that the compiler doesn't include both

6 years agofweep: indent
Alan Cox [Sun, 25 Feb 2018 00:39:58 +0000 (00:39 +0000)]
fweep: indent

6 years agofweep: work in progress
Alan Cox [Sun, 25 Feb 2018 00:37:02 +0000 (00:37 +0000)]
fweep: work in progress

Needs a lot more thinning down to be useful anywhere but 68000

6 years agoMerge pull request #589 from beretta42/sd7
EtchedPixels [Sat, 24 Feb 2018 20:16:34 +0000 (20:16 +0000)]
Merge pull request #589 from beretta42/sd7

coco3: implement sd card.

6 years agoMerge pull request #588 from beretta42/net-fix
EtchedPixels [Sat, 24 Feb 2018 20:15:36 +0000 (20:15 +0000)]
Merge pull request #588 from beretta42/net-fix

net native: u_count is reset after calls to readi/writei now.

6 years agococo3: implement sd card.
Brett Gordon [Sun, 29 Oct 2017 04:05:51 +0000 (00:05 -0400)]
coco3: implement sd card.

6 years agonet native: u_count is reset after calls to readi/writei now.
Brett Gordon [Sat, 24 Feb 2018 15:20:03 +0000 (10:20 -0500)]
net native: u_count is reset after calls to readi/writei now.

6 years agostartrek: add a decent version of it
Alan Cox [Fri, 23 Feb 2018 23:29:28 +0000 (23:29 +0000)]
startrek: add a decent version of it

Downsize is it uses floats and is about 40K. Defloating and debloating would
I think get it under our 32K preferred target

6 years agomath.h: correct prototype of powf
Alan Cox [Fri, 23 Feb 2018 22:56:10 +0000 (22:56 +0000)]
math.h: correct prototype of powf

6 years agolibc: Compliance bugs
Alan Cox [Fri, 23 Feb 2018 22:53:54 +0000 (22:53 +0000)]
libc: Compliance bugs

Missing a prototype for powf()
Missing RAND_MAX definition required by ISO C

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Fri, 23 Feb 2018 19:19:47 +0000 (19:19 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agopdp11: we need setjmp_pdp11.S committed
Alan Cox [Fri, 23 Feb 2018 19:19:13 +0000 (19:19 +0000)]
pdp11: we need setjmp_pdp11.S committed
(not .s)

6 years agoMerge pull request #587 from beretta42/fsck2
EtchedPixels [Fri, 23 Feb 2018 19:17:27 +0000 (19:17 +0000)]
Merge pull request #587 from beretta42/fsck2

build: add fsck -y passing to buildscript

6 years agovile: add half screen scroll vi commands
Alan Cox [Fri, 23 Feb 2018 15:24:23 +0000 (15:24 +0000)]
vile: add half screen scroll vi commands

6 years agovile: a VI Like Editor - WIP
Alan Cox [Fri, 23 Feb 2018 00:45:43 +0000 (00:45 +0000)]
vile: a VI Like Editor - WIP

Not yet ready for Fuzix as we probably want to avoid stdio and curses
(but maybe not - need to see on size). Either way our cursors lacks some
of the funky features this uses at the moment I believe (eg keypad)

6 years agolocaltim: should automatically call tzset
Alan Cox [Wed, 21 Feb 2018 21:44:57 +0000 (21:44 +0000)]
localtim: should automatically call tzset

6 years agolocaltim/gmtime: correct which one is applying corrections
Alan Cox [Wed, 21 Feb 2018 21:28:26 +0000 (21:28 +0000)]
localtim/gmtime: correct which one is applying corrections

Still need to sort the actual correction logic out

6 years agoucp: fix bugs
Alan Cox [Wed, 21 Feb 2018 21:21:04 +0000 (21:21 +0000)]
ucp: fix bugs

1. Remove mount/umount support as they don't work properly anyway
2. Fux read/write out of space etc reporting
3. Fix creat crash when there is no space to make the new name

6 years agormdir: report path correctly
Alan Cox [Wed, 21 Feb 2018 20:44:46 +0000 (20:44 +0000)]
rmdir: report path correctly

6 years agolink: don't allow superuser to link to directories
Alan Cox [Wed, 21 Feb 2018 20:40:49 +0000 (20:40 +0000)]
link: don't allow superuser to link to directories

6 years agolink: remove root power to link to a directory
Alan Cox [Wed, 21 Feb 2018 20:35:48 +0000 (20:35 +0000)]
link: remove root power to link to a directory

It's never used, it makes a nasty mess and it breaks the locking

6 years agomkdir: Fix error recover path
Alan Cox [Wed, 21 Feb 2018 20:32:26 +0000 (20:32 +0000)]
mkdir: Fix error recover path

This tried to unlink random crap not the correct path. Broken when I tidied
up the path walking logic

6 years agoflock: LEVEL_0 update
Alan Cox [Wed, 21 Feb 2018 20:31:36 +0000 (20:31 +0000)]
flock: LEVEL_0 update

6 years agolevels: LEVEL_0 makes no sense except as a uaccess check shortener now
Alan Cox [Wed, 21 Feb 2018 20:30:41 +0000 (20:30 +0000)]
levels: LEVEL_0 makes no sense except as a uaccess check shortener now

For anything else we are probably better using overlays for stuff like
mkdir and rmdir than being incompatible

6 years agounlink: lock right node
Alan Cox [Wed, 21 Feb 2018 20:30:30 +0000 (20:30 +0000)]
unlink: lock right node

6 years agofs: fixes from testing
Alan Cox [Wed, 21 Feb 2018 20:24:01 +0000 (20:24 +0000)]
fs: fixes from testing

1. Don't allow rmdir .
2. Don't allow rmdir of a directory with a file in it (we stopped only subdirs)
3. Don't consider unreferenced inodes when checking if a remount is valid
4. Fix the case of

process A
cd /tmp/foo
process B
rmdir /tmp/foo
process A
ls .   (stale entry)

6 years agofilesys: introduce a routine to check if a directory is empty of files
Alan Cox [Wed, 21 Feb 2018 20:23:42 +0000 (20:23 +0000)]
filesys: introduce a routine to check if a directory is empty of files

6 years agounlink: will need to hold lock over unlinki
Alan Cox [Wed, 21 Feb 2018 20:22:47 +0000 (20:22 +0000)]
unlink: will need to hold lock over unlinki