Image Map Image Map
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Compact flash on the Amstrad NC200

  1. #11
    Join Date
    Feb 2017
    Location
    Zürich, Switzerland
    Posts
    172

    Default

    Oh, yeah, I forgot that (it's not actually in the 'documentation', and that bit is marked as reserved). However the motor doesn't actually come on when the program runs and it's cached.

    sfx: looks at code

    Aha, there's a sort of bug where every clock tick the interrupt handler turns the motor off again. Maybe that's worth fixing. The core problem is that port's not readable so I can't change it without reading the shadow copy, which (a) that standalone program can't access and (b) I don't actually keep a shadow copy yet anyway...

  2. #12

    Default

    Quote Originally Posted by hjalfi View Post
    Oh, yeah, I forgot that (it's not actually in the 'documentation', and that bit is marked as reserved). However the motor doesn't actually come on when the program runs and it's cached.

    sfx: looks at code

    Aha, there's a sort of bug where every clock tick the interrupt handler turns the motor off again. Maybe that's worth fixing. The core problem is that port's not readable so I can't change it without reading the shadow copy, which (a) that standalone program can't access and (b) I don't actually keep a shadow copy yet anyway...
    So I imagine what was happening is that every register access turned the motor on again, then the timer fires and turns it off. 100 Hz buzzer
    Maybe put the copy of the port at some fixed address in your BIOS?

  3. #13
    Join Date
    Feb 2017
    Location
    Zürich, Switzerland
    Posts
    172

    Default

    It lives! Aha! Aaahaaa!

    That deblocking code was *horrible*, and I spent ages tracing down heisenbugs which I *think* were due to a bad filesystem... I reran my mkfs tool, after fixing the bugs, and it worked fine. But creating a CP/M file system is so simple that I'm not sure how? Anyway, it's here: https://github.com/davidgiven/cpmish...sor/pcmcia.inc

    It'll detect an ATA PCMCIA card on startup, set up the DPB accordingly, and then you can use it as a fixed disk. You can have up to a 32MB file system (I have 5 spare bytes of BIOS memory before I have to claim another page of TPA). Performance is great. With my old Lexar 16MB card the screen flakes out a bit during writes, which is a little scary.

    Fun tip: I made the CP/M track/sector to LBA maths much easier by using 1024 CP/M sectors per track. This means that the CP/M track number drops into the middle two bytes of the LBA, so the only maths required is to shift the sector number right by two to get the low byte. Of such things Z80 code is made.

  4. #14
    Join Date
    Aug 2009
    Location
    Oslo, Norway
    Posts
    1,278
    Blog Entries
    3

    Default

    Nice!
    Torfinn

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •