#83 Add support for tape traps with OpenSE BASIC

v1.2
closed
nobody
None
5
2016-06-06
2014-05-13
No

It would be nice to support tape traps when using the OpenSE BASIC ROM. Currently they don't work and saving to tape is particularly slow.

There are two issues here:

1) The tape saving trap is in a different address (0x04d1 instead of 0x04d0). This is trivial unless I'm missing something.

2) Fuse disables the tape traps when a custom ROM is used (via trap_check_rom() -> memory_custom_rom()). This is a bit trickier since that ROM is never the default one, so it will always be marked as custom. This also means that if the default ROM is set using the command line, tape traps will not work either. We can detect if a ROM is a custom one or not based on its checksum rather than its filename, but there might be other issues that I'm not aware of.

Alternatively, I also wonder if we can have the 'Fastloading' and 'Accelerate loaders' features working with the save routines, but I don't know if it is possible or makes sense.

Discussion

  • Fredrick Meunier

    1) This is a bug in OpenSE BASIC, the entry point is intended to be 0x04d0 and was intended to be fixed in version 4.1 and is also fixed with se-1.rom distributed with Fuse

    2) This seems like pretty niche functionality to me, but maybe better done with an option like "Use standard tape traps with custom ROM"? It would free us from maintaining a custom ROM database.

     
  • Alberto Garcia

    Alberto Garcia - 2014-05-26

    1) Ok, I didn't know that. As far as I know the author was not planning to make more releases, though.

    2) Yes I understand that it's niche functionality.

    The reason for this is that since this ROM appears to be the only way to have a working emulator completely based on free software (and the reason why Fuse is in the main section of Debian), there is one bug asking for better support for it (#745402).

    I can also add a small patch to the Debian package to treat this particular ROM as an exception (it's officially available after all so it probably makes sense), but I was wondering if there was any plan to "support" OpenSE BASIC upstream.

     
  • Fredrick Meunier

    Hi Berto,
    As a release is approaching, I've had another look and I think the fix for 1 would be for Debian to patch the SE ROM source:
    From:

    l04d0:                  ;
        di              ;
        ex  af, af'         ;
        ld  a, red          ;
        dec ix          ;
    

    To:

    l04d0:                  ;
        ex  af, af'         ;
        di              ;
        ld  a, red          ;
        dec ix          ;
    

    For 2, on reflection I think it is a mistake to worry about custom ROMs for tape traps (still relevant for blocking auto-load snapshots) - we should just use the traps if the expected instructions are in place at the time (EX AF,AF' at 0x04d0 for saving and RET NZ at 0x056b for loading). Any custom ROM that has preserved the instructions at those entry points can probably be trusted to work.

     
    • Alberto Garcia

      Alberto Garcia - 2016-04-25

      Thanks, I updated the SE ROM and I'll upload the package to Debian soon. I double checked with Andrew Owen and he's ok with the patch.

       
  • Fredrick Meunier

    • status: open --> pending
    • Group: future --> v1.2
     
  • Fredrick Meunier

    • status: pending --> accepted
     
  • Sergio Baldoví

    Sergio Baldoví - 2016-06-06
    • status: accepted --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks