Menu

#90 Supplant boot.b file on Beta 128

v1.2.2
closed
nobody
5
2018-06-04
2016-04-17
No

windale request for Beta 128 from [bugs:#331]: auto-boot games without a boot.B file as Unreal Speccy Portable does.

Unreal Speccy Portable checks for a boot.B file in firsts sectors. If not found, send two keystrokes (Enter). That only makes sense on Pentagon machines with the reset service rom (gluck), the first Enter show a list of files and the latter selects the first file.

Related

Bugs: #331
Bugs: #358

Discussion

1 2 > >> (Page 1 of 2)
  • Fredrick Meunier

    I seem to recall some emulators also create a boot.b file and inject it into the image if it isn't found? I guess this is most possible with .SCL files as they are just lists of the files on the disk rather than a sector by sector layout.

     
  • Fredrick Meunier

    Indeed, Unreal Speccy has a single BOOT.$B in the package that is added to any TR-DOS formatted images that are loaded that are detected to not have an exisitng boot.b file and there is enough space. The supplied one presumably has some code that searches for a suitable program to auto-load.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-04-24

    There are several boot managers that list files in a graphic mode for easing the selection, e.g., Auto Running Boot Utility, Grand's Boot, Stealth Boot, Write Boot. I think Unreal Speccy use Stealth Boot.

    These are rather big programs and I'm not sure about the permission of distribution and how would fit with the GPL. We could supply an option to embed the generic loader preferred by the user.

    If no generic loader is available, Fuse could try to boot the first basic program. I think this might be the best possible setting.

     
  • Fredrick Meunier

    Agree with the point about GPL and including a program like this.

    I also think that trying to load the first BASIC program would be good.

     
  • windale

    windale - 2016-04-27

    In Afterburner in Pentagon mode the sprites flicker unless you choose the Pentagon fix. It doesn't happen on Scorpion. There are some that dont even work on Pentagon

    Agent-X II on Pentagon it seems to have a horrible screen update like it's missing frames, look at the Controls selection screen. This doesn't happen on Scorpion.

    Jet Set Willy seems to play a bit faster on Pentagon, it's small but i'm sure it's there in the speed of the music and the time it takes to get from one side of the screen to the other. This doesn't happen on Scorpion. I imagine Pentagon play all games slightly faster which is an inaccurate experience. I think AUTO-BOOT should definitely be in Scorpion.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-04-27

    Thank you for the samples. The Afterburner and Agent-X II titles have quite visible artifacts. Assuming that the universe of non-pentagon tiltles is greater than pentagon ones (at least for Fuse users), it makes sense using Scorpion as the default machine.

    Regarding the auto-boot feature, we have gathered info from you (the user) and technical info that I was not aware a few weeks ago. After completing the triage, I think this is a must-have feature. It's time to code, but we have other issues at hand and it might take a while.

    If anyone want to take the contest, I attach a patch with my current progress.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-04-28

    Scorpion set as default machine in [r5415].

     

    Related

    Commit: [r5415]

  • windale

    windale - 2016-05-18

    Just out of interest, any progress on this ? I never realised it would be so hard to implement.

     
  • windale

    windale - 2016-06-14

    Anyone ? Is this really hard to do or just that no-one can be bothered ? I would love to see this basic feature.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-06-14

    In my case, I've not invested more time to this issue. Sooner or later, I'll give it another bash unless I'm beaten to it. It's a nice feature. Please, be patient.

     
  • windale

    windale - 2016-07-27

    Anybody even thought about finishing this simple feature ? It's actually more than just a feature, it will increase overall compatibility because new users will probably try to load some SCL orTRD (that dont obviously autoboot) and think that they dont work on Fuse. They will probably think DSK files dont work as well because they dont autoboot either. Please ? Is it really a long time consuming task compared to the other things being added ? It was started on but then forgotten about.

     
  • Fredrick Meunier

    The feature sounds basic but the implementation isn't simple - it requires understanding the TR-DOS on-disk format and injecting a boot.b program pointing at the main BASIC loader for the software on ths disk without causing problems.

    We all understand that the feature is valuable but there are no promises on if and when this feature will be completed. As Sergio says above, we'd be happy to use the code if someone who really wanted this feature sooner finished it before we get to it and the work to date is attached to the issue above.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-11

    I'm looking again into this issue. When there is only one program in a disk, we should use a simple loader to run it:

    1 RANDOMIZE USR 15619: REM : RUN "program"
    

    But I'm thinking about the distribution of a bigger boot loader for disks that have many programs. There are lots of boot loaders [1] and seems that are publicly available, unfortunately without a known license. I think these programs are usually homemade and are informally distributed.

    The case is "SMALL boot" [2] has attracted my attention. It's 508 bytes (2 sectors), has english texts, no gfx/sound effects. It's quite handy and would complement the simple loader. It's not GPL but neither are some ROMs, a distro could strip this file from distribution. I'm thinking of contacting the author and request an explicit grant of distribution, barring objections.

    [1] https://zxaaa.net/view_demos.php?t=0&s=boot&title=Title
    [2] https://zxaaa.net/view_demo.php?id=2047

     
  • Fredrick Meunier

    Sounds good - it would be ideal if we had source + GPL for the loader, but permission to distribute would be enough I think.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-12

    This patch add a simple boot loader for the first basic program. Any tests with SCL/TRD images are welcome.

    The insertion of a boot loader can be disabled with: fuse --no-auto-load

    I've tried to separate the TR-DOS handling functions but the write operations to disk are highly coupled to disk.c

     
  • BogDan Vatra

    BogDan Vatra - 2016-08-13

    I think you forgot to add trdos.c/.h to the patch

     
    • Sergio Baldoví

      Sergio Baldoví - 2016-08-13

      I think you forgot to add trdos.c/.h to the patch

      Umm... no! These commands work for me:

      svn patch autoboot_02.diff
      

      or

      patch -p 0 < autoboot_02.diff
      
       
  • BogDan Vatra

    BogDan Vatra - 2016-08-13

    Ah, sorry my bad :) after I apllyed the patch I did a git clean and it removed the trdos files :)

    It seems to works fine (I tried a just few .scl & .trd files because I don't have many), I found one .trd file that didn't worked though (attached).

    I don't know if it is related to this patch, but I foung a problem with the sound when I'm opening a .scl/.trd file when another one is already opened and it's playing some music. The sound frame is not blanked and you hear the last part until the new games starts to paly it's own music :)

     

    Last edit: BogDan Vatra 2016-08-13
    • Sergio Baldoví

      Sergio Baldoví - 2016-08-13

      I don't know if it is related to this patch, but I foung a problem with the sound when I'm opening a .scl/.trd file when another one is already opened and it's playing some music. The sound frame is not blanked and you hear the last part until the new games starts to paly it's own music :)

      This also happens without this patch. utils_open_file() doesn't reset the machine if it's capable of loading TRDOS disk. I think this is intendeed to allow the use of File->Open when inserting multi-disk games. There is a conflict when we want to run a new game. I'm not sure if blanking the sound frame is desired for the first case.

       
  • BogDan Vatra

    BogDan Vatra - 2016-08-13

    For those who what to test this patch on Android here https://drive.google.com/open?id=0Bzzpb2GB8vXiRDdIUGhDZFZjZjQ you can find the .apk .

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-13

    Thanks for testing. This disk already have a boot file so the patch does nothing. Apparently someone renamed the program to boot, as there are subliminal messages in the FAT table:

    Diskname: prince_p
    80 Tracks, Double Side, capacity 640kB
    Number of files/deleted: 4/0
    Free sectors/bytes:      1562/399872
    First free sector/track: 6/62
    
    FILENAME      TYPE         SECTORS ADDRESS LENGTH TRACK SECTOR 
    --------------------------------------------------------------
    boot     <B>  BASIC PROGRAM  255      53     53     1      0
       of    <E>  UNKNOWN        255       0      0    16     15
     PERSIA! <S>  UNKNOWN        255       0      0    32     14
     PHF/96! <T>  UNKNOWN        217       0      0    48     13
    

    It seems that this game doesn't work with Scorpion machines. You have to select Pentagon 128K and open the disk.

     
  • BogDan Vatra

    BogDan Vatra - 2016-08-13

    Are you going to add the "SMALL boot"? Or this patch is final? I'm thingking to push the apk to google play beta channel :)

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-13

    Are you going to add the "SMALL boot"?

    No. I haven't got a response from the author.

    Or this patch is final? I'm thingking to push the apk to google play beta channel :)

    I'll make some cosmetic changes and add some notes. If there isn't bad feedback, I'll commit it next week.

     

    Last edit: Sergio Baldoví 2016-08-13
  • BogDan Vatra

    BogDan Vatra - 2016-08-13

    Ok, then I'll wait for you to push it.
    Thanks!

     

    Last edit: BogDan Vatra 2016-08-13
  • Fredrick Meunier

    I tried these demos:
    352919
    Aeon
    Airspace
    Amiga
    Artfx
    EyeAche2
    Eyeache
    Satisfaction Megademo
    TDream
    WEED

    And these games:
    Ball Quest
    Fire & Ice
    Robocop 1024
    UFO1-EnemyUnknown
    Pang 16 colour

    And the patch seemed to work as expected in all cases, adding a working boot.b when required and not causing problems when not.

    It does raise two thoughts for other tasks someone could take on in the future:
    1. I think it would be worth having a setting for which machine you want to default to for TR-DOS images
    2. The disk image handling code probably belongs in libspectrum, along with the file system handling code.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.