Fixing a UEF

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
pau1ie
Posts: 328
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Fixing a UEF

Postby pau1ie » Wed Jun 14, 2017 10:16 pm

I have a UEF image (Juggle Puzzle) from John's educational archive . The first program on the tape is as follows:

Code: Select all

10 PAGE=&E00
20 *FX200,3
30*FX18
40*FX225
50*FX228,0
60*FX226
70*FX227
80CHAIN""


In b-em If I run it, it just sits there. If however I press break then CH."", it runs OK. Any ideas why? I can only assume it doesn't like the setting for PAGE. I am tempted to remove this program as I suspect it won't do much useful after a cold boot of jsbeeb. Does this seem reasonable? If so, how do I edit a UEF file? I have kind of been wanting an excuse to use davidb's UEFfile, maybe this is it...

EDIT - If you are not familiar with b-em, CH."" as above will load the next program of the tape, i.e. the same one line 80 should have loaded if it worked.
I'm working on http://bbcmicro.co.uk

User avatar
davidb
Posts: 1901
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Fixing a UEF

Postby davidb » Wed Jun 14, 2017 11:13 pm

I think B-Em (and possibly other emulators) gets stuck when it encounters certain chunks in a UEF file. If you run UEFtrans on the file to list the chunks, it might help to explain why B-Em isn't happy with it:

Code: Select all

UEFtrans.py JugglePuzzle.uef chunks

User avatar
pau1ie
Posts: 328
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Fixing a UEF

Postby pau1ie » Thu Jun 15, 2017 8:56 pm

I don't think it is that, it all looks pretty simple, as follows:

Code: Select all

$ python2 UEFtrans.py JugglePuzzle_BE.uef chunks
Chunks in JugglePuzzle_BE.uef
     0: O - # - # - _ - # - # - # - # -
    16: # - # - # - # - _ - # - # - # -
    32: _ - # - # - # - _ - # - # - _ -
    48: # - # - # - # - # - # - # - # -
    64: # - # - # - # - _ - # - # - # -
    80: # - # - # - # - # - # - # - # -
    96: # - # - # - # - # - # - # - # -
   112: # - # - # - # - _
$ python2 UEFtrans.py help chunks
Syntax: UEFtrans.py <UEF file> chunks

        Display the chunks in the UEF file in a table format
        with the following symbols denoting each type of
        chunk:
                O        Originator information            (0x0)
...
                #, *     File data block             (0x100,0x102)
                #x, *x   Multiplexed block           (0x101,0x103)
                -        High tone (inter-block gap)       (0x110)
                +        High tone with dummy byte         (0x111)
                _        Gap (silence)                     (0x112)
I'm working on http://bbcmicro.co.uk

User avatar
lurkio
Posts: 1292
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Fixing a UEF

Postby lurkio » Thu Jun 15, 2017 9:25 pm

pau1ie wrote:I have a UEF image (Juggle Puzzle) from John's educational archive . The first program on the tape is as follows:

Code: Select all

10 PAGE=&E00
20 *FX200,3
30*FX18
40*FX225
50*FX228,0
60*FX226
70*FX227
80CHAIN""
In b-em If I run it, it just sits there. If however I press break then CH."", it runs OK. Any ideas why? I can only assume it doesn't like the setting for PAGE.

Well, I was going to say that if PAGE was at something other than &E00 before you loaded the program, then the first line would change PAGE and immediately render the rest of the program "invisible" to BASIC, and that the only way the program could ever run successfully was if PAGE was already at &E00 before you loaded it. However, it seems that you can get away with changing PAGE in the first line of a short(?) BASIC prog and have it run to completion! Weird.


pau1ie wrote:I am tempted to remove this program as I suspect it won't do much useful after a cold boot of jsbeeb. Does this seem reasonable?

First, check that there's no hidden data above TOP: do so with PRINT ~TOP-PAGE and compare the result with the file-length on tape. If equal, then just remove line 10. The rest of the prog just seems to be resetting the function keys, and you shouldn't need PAGE to be at &E00 to do that. However, the next program might need to be downloaded to &E00.


pau1ie wrote:If so, how do I edit a UEF file? I have kind of been wanting an excuse to use davidb's UEFfile

I know naathing about UEFfile. But why not just transfer the files to .SSD and see if they can be run on DFS? Or is that not your goal?

:?:

User avatar
davidb
Posts: 1901
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Fixing a UEF

Postby davidb » Thu Jun 15, 2017 9:34 pm

Can you see if the UEF file from Every Game Going is the same as the UEF file you have? I tried that one with B-Em and didn't experience any problem with it.

User avatar
pau1ie
Posts: 328
Joined: Thu May 10, 2012 9:48 pm
Location: Bedford

Re: Fixing a UEF

Postby pau1ie » Sat Jun 17, 2017 8:46 pm

It's the same file, I suspect they all come from the stairway to hell archive. Weirdly it works now.
Moving on!
I'm working on http://bbcmicro.co.uk

User avatar
vanekp
Posts: 345
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: Fixing a UEF

Postby vanekp » Thu Nov 23, 2017 6:09 pm

pau1ie wrote:I don't think it is that, it all looks pretty simple, as follows:

Code: Select all

$ python2 UEFtrans.py JugglePuzzle_BE.uef chunks
Chunks in JugglePuzzle_BE.uef
     0: O - # - # - _ - # - # - # - # -
    16: # - # - # - # - _ - # - # - # -
    32: _ - # - # - # - _ - # - # - _ -
    48: # - # - # - # - # - # - # - # -
    64: # - # - # - # - _ - # - # - # -
    80: # - # - # - # - # - # - # - # -
    96: # - # - # - # - # - # - # - # -
   112: # - # - # - # - _
$ python2 UEFtrans.py help chunks
Syntax: UEFtrans.py <UEF file> chunks

        Display the chunks in the UEF file in a table format
        with the following symbols denoting each type of
        chunk:
                O        Originator information            (0x0)
...
                #, *     File data block             (0x100,0x102)
                #x, *x   Multiplexed block           (0x101,0x103)
                -        High tone (inter-block gap)       (0x110)
                +        High tone with dummy byte         (0x111)
                _        Gap (silence)                     (0x112)


Pity that UEFtrans.py does not support Chunk &0104 - defined tape format data block, and probably some others.
Peter.

User avatar
davidb
Posts: 1901
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Fixing a UEF

Postby davidb » Thu Nov 23, 2017 6:21 pm

vanekp wrote:Pity that UEFtrans.py does not support Chunk &0104 - defined tape format data block, and probably some others.

Patches for those features will be gratefully received. ;)


Return to “software: other”

Who is online

Users browsing this forum: No registered users and 3 guests