TMF Hg

add HDD support + fixes

  • Sat, 17 Nov 2012 19:18:29 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Sat, 17 Nov 2012 19:18:29 +0000] rev 112
  • add HDD support + fixes

    Patch-Author: Andrew Warkentin <andreww591!gmail>
    Patch-Message-ID: <50A772FC.8020009@gmail.com>

    I have added floppy write support, full hard disk emulation, and proper handling of DMA page faults to FreeBee. I also fixed the floppy step commands, changed the "force interrupt" floppy command to generate a type 1 status, and changed the DMA address counter to reset to 3fff when a transfer completes (which is what Unix seems to expect - without it, the kernel says that the floppy isn't ready). The floppy, hard disk, and DMA page fault tests all pass. Initializing hard disks and floppies also works (the geometry for both is still fixed by the size of the image, though, and format commands only appear to succeed, but they don't modify the image). Unix still doesn't run, though (it hangs after reading some sectors from the floppy).

Improve floppy disc support

  • Sat, 17 Nov 2012 19:13:08 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Sat, 17 Nov 2012 19:13:08 +0000] rev 111
  • Improve floppy disc support

    Patch-Author: Andrew Warkentin <andreww591!gmail>
    Patch-Message-ID: <50A772FC.8020009@gmail.com>

[musashi] fix stackframe type for bus errors

  • Thu, 08 Dec 2011 23:44:19 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 08 Dec 2011 23:44:19 +0000] rev 110
  • [musashi] fix stackframe type for bus errors

    Bus errors incorrectly pushed a Type 0000 stackframe, when they should have pushed a Type 1000 (Type $8) stackframe.
    Also, type 1000 frames were not handled for 68010 CPUs. They are now, but code must later be added to handle them for 68020s. FIXME!

    Reported-By: Armin Diehl <ad ardiehl.de>

[musashi] Fix handling of bus errors

  • Tue, 15 Nov 2011 10:12:37 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Tue, 15 Nov 2011 10:12:37 +0000] rev 109
  • [musashi] Fix handling of bus errors

    Patch-Author: Andrew Warkentin <andreww591!gmail>
    Patch-MessageID: <4EC200CE.2020304@gmail.com>

    I have fixed the first page fault test failure in FreeBee (the page fault test now hangs rather than errors out, because it is trying to read from the hard drive to test DMA page faults).

    There were actually two bugs (the first bug was masking the second one).

    First, the ancient version of Musashi that you used is unable to properly resume from bus errors that happen in the middle of certain instructions (some instructions are fetched in stages, with the PC being advanced to each part of the instruction, so basically what happens is the CPU core attempts to read the memory location referenced by the first operand, the bus error occurs, causing the PC to jump to the exception vector, but the faulting instruction is still in the middle of being fetched, so the PC is then advanced past the beginning of the exception handler). I fixed this by delaying the jump to the bus error vector until after the faulting instruction finishes.

    The second bug is simpler - you had the UDS and LDS bits in BSR0 inverted (they are supposed to be active low).

Fix BSR0 UDS/LDS bit polarity

  • Tue, 15 Nov 2011 09:30:57 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Tue, 15 Nov 2011 09:30:57 +0000] rev 108
  • Fix BSR0 UDS/LDS bit polarity

    Patch-Author: Andrew Warkentin <andreww591!gmail>
    Patch-MessageID: <4EC200CE.2020304@gmail.com>

    ... "The second bug is simpler - you had the UDS and LDS bits in BSR0 inverted (they are supposed to be active low)."

only strobe BUSERR if dma access caused a pagefault, and don't send IRQ0s (musashi auto-clears IRQs)!

  • Fri, 04 Mar 2011 02:12:25 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 02:12:25 +0000] rev 107
  • only strobe BUSERR if dma access caused a pagefault, and don't send IRQ0s (musashi auto-clears IRQs)!

More verbose logging of page faults and bus errors

  • Fri, 04 Mar 2011 01:38:39 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 01:38:39 +0000] rev 106
  • More verbose logging of page faults and bus errors

fix small typos in WriteMem32

  • Fri, 04 Mar 2011 01:37:42 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 01:37:42 +0000] rev 105
  • fix small typos in WriteMem32

    WriteMem32 warnings for writes to MapRAM and VRAM mirrors were incorrectly declaring themselves as read operations.

fix issue with WE+ bit becoming unset, fix pagefault:not-mapped-in logic

  • Fri, 04 Mar 2011 01:36:30 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 01:36:30 +0000] rev 104
  • fix issue with WE+ bit becoming unset, fix pagefault:not-mapped-in logic

    - The WE+ (page write enable) bit was becoming unset when the Page Status bits were being set.
    A stupid mistake in an AND expression was unsetting the write-enable, thus making S4TEST 12,2 and 12,3 fail spectacularly.

    - Pagefaults were not being generated correctly for pages which were not mapped in. Even Supervisor code accessing unmapped pages should get a PF.

more verbose bus error logging

  • Fri, 04 Mar 2011 00:44:36 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 00:44:36 +0000] rev 103
  • more verbose bus error logging

add Error Enable bit to gcr write handler

  • Fri, 04 Mar 2011 00:44:06 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 00:44:06 +0000] rev 102
  • add Error Enable bit to gcr write handler

add Error Enable bit to system state

  • Fri, 04 Mar 2011 00:41:52 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Fri, 04 Mar 2011 00:41:52 +0000] rev 101
  • add Error Enable bit to system state

Fix broken pagebit update code (was failing S4TEST 19 Map Translation test)

  • Thu, 03 Mar 2011 13:05:21 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 03 Mar 2011 13:05:21 +0000] rev 100
  • Fix broken pagebit update code (was failing S4TEST 19 Map Translation test)

use LOG functions for kbc debugging, make KBC debugging optional

  • Thu, 03 Mar 2011 08:18:57 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 03 Mar 2011 08:18:57 +0000] rev 99
  • use LOG functions for kbc debugging, make KBC debugging optional

add single-string logging functions to work around gcc warning

  • Thu, 03 Mar 2011 08:15:09 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 03 Mar 2011 08:15:09 +0000] rev 98
  • add single-string logging functions to work around gcc warning

Add 60Hz timer tick patch from Andrew Warkentin <andreww591 gmail com>

  • Wed, 02 Mar 2011 07:16:32 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 02 Mar 2011 07:16:32 +0000] rev 97
  • Add 60Hz timer tick patch from Andrew Warkentin <andreww591 gmail com>

    ... I have also attached a patch that adds the 60Hz timer interrupt (I'm not sure if it's totally correct, though, since the cursor blinks rather slowly).

    Received-From: Andrew Warkentin <andreww591 gmail com>
    Signed-Off-By: Philip Pemberton <philpem@philpem.me.uk>

Add keyboard patch from Andrew Warkentin <andreww591 gmail com>

  • Tue, 01 Mar 2011 21:33:32 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Tue, 01 Mar 2011 21:33:32 +0000] rev 96
  • Add keyboard patch from Andrew Warkentin <andreww591 gmail com>

    I fixed the keyboard in FreeBee. I looked at the keyboard driver source available on a few sites, and it appears that BEGKBD/KEY_BEGIN_KEYBOARD is only supposed to be sent after the end of mouse data, and that KLAST/KEY_LIST_END is not a separate code, but a flag that is set on the last non-KALLUP/KEY_ALL_UP code in a list. I have attached a patch that implements these changes. I have also attached a patch that adds the 60Hz timer interrupt (I'm not sure if it's totally correct, though, since the cursor blinks rather slowly).

    Received-From: Andrew Warkentin <andreww591 gmail com>
    Signed-Off-By: Philip Pemberton <philpem@philpem.me.uk>

make it possible to eject the floppy disc (use F11!)

  • Thu, 10 Feb 2011 01:09:42 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 01:09:42 +0000] rev 95
  • make it possible to eject the floppy disc (use F11!)

fix keyboard update-flag handler to only set flag when a mapped key has been pressed

  • Thu, 10 Feb 2011 01:09:04 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 01:09:04 +0000] rev 94
  • fix keyboard update-flag handler to only set flag when a mapped key has been pressed

properly handle 8 and 16 bit KBC writes

  • Thu, 10 Feb 2011 01:08:32 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 01:08:32 +0000] rev 93
  • properly handle 8 and 16 bit KBC writes

remove edge-sensive kbc intr handler, was breaking the keyboard stuff. also made kbd refresh at same rate as 60Hz tick.

  • Thu, 10 Feb 2011 00:07:59 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 10 Feb 2011 00:07:59 +0000] rev 92
  • remove edge-sensive kbc intr handler, was breaking the keyboard stuff. also made kbd refresh at same rate as 60Hz tick.

only send kb state when the state changes, use kb command constants

  • Wed, 09 Feb 2011 23:45:55 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 23:45:55 +0000] rev 91
  • only send kb state when the state changes, use kb command constants

merge heads

  • Wed, 09 Feb 2011 22:05:42 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 22:05:42 +0000] rev 90
  • merge heads

make utils.h include stdio (for LOG functions)

  • Thu, 30 Dec 2010 00:45:13 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:45:13 +0000] rev 89
  • make utils.h include stdio (for LOG functions)

add NELEMS macro to utils.h

  • Thu, 30 Dec 2010 00:44:25 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:44:25 +0000] rev 88
  • add NELEMS macro to utils.h

fix fdc irq handling (but irqs still disabled for now until the arbiter is sorted out)

  • Thu, 30 Dec 2010 00:41:48 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:41:48 +0000] rev 87
  • fix fdc irq handling (but irqs still disabled for now until the arbiter is sorted out)

add keyboard event handler; need to do register r/w next.

  • Thu, 30 Dec 2010 00:37:03 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Thu, 30 Dec 2010 00:37:03 +0000] rev 86
  • add keyboard event handler; need to do register r/w next.

more keyboard fixes... interrupt logic needs fixing... grrrrr...

  • Wed, 09 Feb 2011 17:11:48 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 17:11:48 +0000] rev 85
  • more keyboard fixes... interrupt logic needs fixing... grrrrr...

major work on keyboard driver

  • Wed, 09 Feb 2011 16:35:49 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 16:35:49 +0000] rev 84
  • major work on keyboard driver

fix stupid mistakes in keyboard code (i broke the build, w00t...)

  • Wed, 09 Feb 2011 15:43:48 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:43:48 +0000] rev 83
  • fix stupid mistakes in keyboard code (i broke the build, w00t...)

fix DELETE mapping and add keyboard evt handler

  • Wed, 09 Feb 2011 15:40:05 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:40:05 +0000] rev 82
  • fix DELETE mapping and add keyboard evt handler

ignore discs dir

  • Wed, 09 Feb 2011 15:39:16 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:39:16 +0000] rev 81
  • ignore discs dir

implement some more of the keyboard controller

  • Wed, 09 Feb 2011 15:03:31 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 09 Feb 2011 15:03:31 +0000] rev 80
  • implement some more of the keyboard controller

eliminate redundant head

  • Wed, 29 Dec 2010 09:06:17 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 09:06:17 +0000] rev 79
  • eliminate redundant head

merge heads (properly this time)

  • Wed, 29 Dec 2010 09:04:43 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 09:04:43 +0000] rev 78
  • merge heads (properly this time)

discard head, need to merge some stuff back in later

  • Wed, 29 Dec 2010 03:27:35 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 03:27:35 +0000] rev 77
  • discard head, need to merge some stuff back in later

move edge-sensitive FDC IRQ to main()

  • Mon, 06 Dec 2010 08:27:21 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Mon, 06 Dec 2010 08:27:21 +0000] rev 76
  • move edge-sensitive FDC IRQ to main()

init state variables properly

  • Mon, 06 Dec 2010 08:27:05 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Mon, 06 Dec 2010 08:27:05 +0000] rev 75
  • init state variables properly

add first cut keyboard driver

  • Wed, 29 Dec 2010 01:38:54 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Wed, 29 Dec 2010 01:38:54 +0000] rev 74
  • add first cut keyboard driver

small amt of wd279x tidying

  • Tue, 28 Dec 2010 22:37:21 +0000
  • by Philip Pemberton <philpem@philpem.me.uk> [Tue, 28 Dec 2010 22:37:21 +0000] rev 73
  • small amt of wd279x tidying