Electron Game Server / UEF JavaScript

discuss PC<>Acorn file transfer issues & the use of FDC, XFER, Omniflop/disk etc.
User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Electron Game Server / UEF JavaScript

Postby 8bitkick » Sun Oct 08, 2017 8:26 pm

Hi,

I've started making a UEF converter in JavaScript (PlayUEF) that converts to & plays uncompressed 44.1KHz audio in browser. UI a bit rough but it works!

I like the idea that someone can get an Electron, plug in an audio cable and go :)

UPDATE: connected with 800+ games in STH for testing here: http://www.8bitkick.cc/PlayUEF.html


:twisted:
Last edited by 8bitkick on Mon Oct 30, 2017 8:57 pm, edited 3 times in total.

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Sat Oct 21, 2017 4:03 pm

I have persevered with my little project. I just need to add links to STH UEF archive... with permission...

PlayUEF - now with nice UI - https://s3-us-west-1.amazonaws.com/8bit ... ayUEF.html

Image

User avatar
Pernod
Posts: 1080
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: Electron Game Server / UEF JavaScript

Postby Pernod » Sat Oct 21, 2017 4:59 pm

I like that, very nice =D>
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
daveejhitchins
Posts: 3847
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Electron Game Server / UEF JavaScript

Postby daveejhitchins » Sat Oct 21, 2017 5:04 pm

<Like Button>

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Sun Oct 22, 2017 9:39 pm

Glad you like it!

For ease of testing I've linked it up to the entire STH Electron UEF archive, for your browsing pleasure: =D>

http://www.8bitkick.cc/PlayUEF.html

NB I've only implemented the basic UEF chunks so far ( &0100, &0110 and &0111) so have compatibility with 80% of the images.

Any unsupported chunks for a given game are logged in the JavaScript console at the moment. I need to make that a bit nicer and scan for compatibility when I have time... and ideally add the rest of the chunks types - adding support for phase, baud & format changes are all possible!

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

Re: Electron Game Server / UEF JavaScript

Postby davidb » Mon Oct 23, 2017 12:09 am

Very nice! I like the way you show the data in each block. :)

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Sat Oct 28, 2017 3:31 am

davidb wrote:Very nice! I like the way you show the data in each block. :)


Thanks! I just saw your cassette IO project!! 8)

You might have some ideas about my turbo loader question - viewtopic.php?f=2&t=10964&p=182169#p182169

Easy enough to insert a standard asm preloader at 1200 baud in front of each game UEF. Not sure how to do this though...and in a way that doesn't occupy electron memory games want to load over...!

User avatar
MartinB
Posts: 4591
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Electron Game Server / UEF JavaScript

Postby MartinB » Sat Oct 28, 2017 8:27 am

Excellent work on the loader, it's very nice indeed.... =D> 8)

8bitkick wrote:Not sure how to do this though...and in a way that doesn't occupy electron memory games want to load over...!

It's not easy. The Beeb/Elk UPURS system isn't designed for program loading, it's largely predicated on managing real floppy drives, but because I could, I added a fast UEF loader that nods towards your system's aspirations by loading unmodified UEF digital tape-conversions direct from a PC whilst still retaining the tape block format.

UPURS is rom-based and so has a good start for its code storage but because the loader extension (UPCFS) needs to steal vectors and manage loading streams on the fly, I had to find pockets of ram all over the place in an attempt to 'hide' loader code from the incoming program. In the end, I achieved only about 60% compatibility on the Electron and that involves a lot of convoluted and complex memory juggling :roll:. Still, all those that do work though go pretty fast - example below courtesy of Paul V's Retro-Kit site.

So, in answer to your pondering about covert memory use for bespoke loaders, it's hard... :wink:



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

Re: Electron Game Server / UEF JavaScript

Postby davidb » Sat Oct 28, 2017 12:31 pm

8bitkick wrote:You might have some ideas about my turbo loader question - viewtopic.php?f=2&t=10964&p=182169#p182169

Easy enough to insert a standard asm preloader at 1200 baud in front of each game UEF. Not sure how to do this though...and in a way that doesn't occupy electron memory games want to load over...!

I somehow missed your message in the turbo loader thread. I'll add comments there, but I'll just say that I think it's unlikely to be possible to modify the rate at which the Electron can decode a bitstream. The bits are decoded in hardware that seems to be designed around the 1200 Hz and 2400 Hz frequencies. I had hoped that, by playing with one of the counters exposed by the ULA, it would be possible to "trick" it into recognising higher frequencies and maybe I didn't exhaust that possibility, but the initial results weren't promising.

I'm hoping that message like this Electron ULA Schematics one will clear up some of the details around how cassette I/O is handled on the Electron.

But we can still experiment with compression techniques to try and cut down loading times. :)

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Sun Oct 29, 2017 1:08 am

MartinB wrote:Excellent work on the loader, it's very nice indeed.... =D> 8)
So, in answer to your pondering about covert memory use for bespoke loaders, it's hard... :wink:


Thanks. Hmm yep I am trying to do this all in software - "just add cassette cable". I think you have convinced me that finding a way to exploit the existing cassette FS (and automating some optimization of cassette audio during UEF decode) would be best... if I want to maintain compatibility with the 800+ UEF images out there...

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

Re: Electron Game Server / UEF JavaScript

Postby davidb » Mon Oct 30, 2017 3:49 pm

MartinB wrote:UPURS is rom-based and so has a good start for its code storage but because the loader extension (UPCFS) needs to steal vectors and manage loading streams on the fly, I had to find pockets of ram all over the place in an attempt to 'hide' loader code from the incoming program. In the end, I achieved only about 60% compatibility on the Electron and that involves a lot of convoluted and complex memory juggling :roll:. Still, all those that do work though go pretty fast - example below courtesy of Paul V's Retro-Kit site.

Can you say what the problems were with the remaining programs? It might be possible to get higher than 60% compatibility if UPCFS could be configured in specific ways for specific programs. I realise, however, that you might not want to spend much more time on improving compatibility if it makes the system a lot more complex to use and maintain.

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Mon Oct 30, 2017 5:20 pm

davidb wrote:
MartinB wrote:UPURS is rom-based and so has a good start for its code storage but because the loader extension (UPCFS) needs to steal vectors and manage loading streams on the fly, I had to find pockets of ram all over the place in an attempt to 'hide' loader code from the incoming program. In the end, I achieved only about 60% compatibility on the Electron and that involves a lot of convoluted and complex memory juggling :roll:. Still, all those that do work though go pretty fast - example below courtesy of Paul V's Retro-Kit site.

Can you say what the problems were with the remaining programs? It might be possible to get higher than 60% compatibility if UPCFS could be configured in specific ways for specific programs. I realise, however, that you might not want to spend much more time on improving compatibility if it makes the system a lot more complex to use and maintain.


Sorry to fork threads. I'd be interested to know what titles worked / failed for Martin and why also.

I am starting to think metadata per UEF which describes 1) if its turbo load compatible 2) what RAM range is 'safe' for a loader to reside, and 3) order which files in the UEF need loading / can be discarded, would probably solve problems (I think this is where David is going). e.g. discard loading screen and keep the turbo loader there.

It would be quite a drag to create this meta data but I could give it a shot for some favorites!?
Last edited by 8bitkick on Mon Oct 30, 2017 8:55 pm, edited 1 time in total.

User avatar
CMcDougall
Posts: 5773
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: Electron Game Server / UEF JavaScript

Postby CMcDougall » Mon Oct 30, 2017 5:38 pm

great work 8bitKick!! :D =D> =D> =D>
8bitkick wrote:UPURS: I'd be interested to know what titles worked / failed for Martin and why also?

Me, Stuart & others done some more digging into it here, with Martin's newer UPCFS loader, info on titles here:
viewtopic.php?f=3&t=8807&p=97189&hilit=upcfs+games#p97129
ImageImageImage

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Mon Oct 30, 2017 10:04 pm

CMcDougall wrote:great work 8bitKick!! :D =D> =D> =D>
8bitkick wrote:UPURS: I'd be interested to know what titles worked / failed for Martin and why also?

Me, Stuart & others done some more digging into it here, with Martin's newer UPCFS loader, info on titles here:
viewtopic.php?f=3&t=8807&p=97189&hilit=upcfs+games#p97129


Thanks I will take a look!!

Out of interest did you get PlayUEF to work with your Elk? I am trying to determine how fast I can push it without corrupting... I get down to 150 seconds with just an Elk + cassette cable to my laptop, but am I just lucky!?

Arcadians / Electron cassette interface world speed records
(Without changing / compressing original file data)

EDIT - Moved to new thread http://www.stardot.org.uk/forums/viewtopic.php?f=3&t=13972&p=184563#p184563
Last edited by 8bitkick on Tue Oct 31, 2017 7:15 am, edited 3 times in total.

User avatar
MartinB
Posts: 4591
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Electron Game Server / UEF JavaScript

Postby MartinB » Tue Oct 31, 2017 12:33 am

Hello - I’ve been max’d out today so sorry for the slow response.

The original mandate I set for UPCFS was similar to that of PlayUEF in that it should load completely unmodified Beeb and Elk UEF’s just as they are found in the many internet respositories. In fact, simply through ignorance, I missed a trick in that many are zipped with gzip so UPCFS requires that these are unzipped first to become true UEF’s but other than that, I stayed true to my guideline. Indeed, I still wouldn’t at all be keen to start tinkering with either the UEF’s or with UPCFS itself in order to try to embody some degree of bespoke behaviour per title.

The bottom line is that I actually created a filing system whose interface is the UPURS User-Port RS2323 serial engine (as opposed to disc or tape or MMC etc) but I based it on the CFS and implemented it by hijacking the latter. Because of this implementation, there are lots of compromises and weaknesses associated with memory conflicts and vector ownership battles. Ultimately, I could (I believe :-k ) achieve nigh on 100% compatibility by properly writing a stand-alone FS, still based on the UPURS engine but properly adhering to all the correct guidelines for such.

What I’ll probably do is post the UPCFS source tomorrow, it’s well commented and should, in conjunction with the discussions Colin linked to (thanks Col 8) ), show the flavour of the current compatibility issues.

Incidentally, Arcadians is sadly one of the UPCFS ‘doesn’t work’ games on the Elk, although it does go right through the loading sequence before crashing :roll:. If it did work, then I’d be claiming that ‘world speed record’ because UPCFS loads the entire UEF in less than 10 seconds.... :wink:

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Tue Oct 31, 2017 2:21 am

MartinB wrote:many are zipped with gzip so UPCFS requires that these are unzipped first to become true UEF’s


Yep... gzipped but keeping the same UEF extension, then placed inside another zip... that threw me for a while too! PlayUEF checks at both levels now and seems to open anything on STH I've thrown at it... http://www.8bitkick.cc/PlayUEF.html I'm sure there are some quirky UEF chunks it doesn't support lurking somewhere though.

MartinB wrote:I still wouldn’t at all be keen to start tinkering with either the UEF’s or with UPCFS itself in order to try to embody some degree of bespoke behaviour per title.


Agreed. The more automation the better, which is why I've stuck to 'physical layer' optimizations 'til now. The work you've done is clearly well beyond that!! I am curious about combining it with 6502-side decompression like DavidB and Rich Talbot have been working on. But implementing it will depend on RAM usage and load behavior of individual titles I suspect...

MartinB wrote: I’d be claiming that ‘world speed record’ because UPCFS loads the entire UEF in less than 10 seconds.... :wink:


Yeah PlayUEF's category needs narrowing to "native cassette interface"... it can't compete with peripheral performance enhancement :P

User avatar
MartinB
Posts: 4591
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Electron Game Server / UEF JavaScript

Postby MartinB » Tue Oct 31, 2017 7:11 am

8bitkick wrote:Yeah PlayUEF's category needs narrowing to "native cassette interface"... it can't compete with peripheral performance enhancement :P

Oh absolutely 8) - I was just kidding about the speed record and indeed, these are not competing systems, PlayUEF is truly hardware and software minimalist and all the more impressive for that.... =D>

Anyway, I won't continue to de-focus your thread, I'll post any further UPCFS info on one of the UPURS threads and then you can cherry-pick any useful information back over here if it helps.

User avatar
8bitkick
Posts: 87
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: Electron Game Server / UEF JavaScript

Postby 8bitkick » Tue Oct 31, 2017 7:25 am

MartinB wrote:
8bitkick wrote:Yeah PlayUEF's category needs narrowing to "native cassette interface"... it can't compete with peripheral performance enhancement :P

Oh absolutely 8) - I was just kidding about the speed record and indeed, these are not competing systems, PlayUEF is truly hardware and software minimalist and all the more impressive for that.... =D>

Anyway, I won't continue to de-focus your thread, I'll post any further UPCFS info on one of the UPURS threads and then you can cherry-pick any useful information back over here if it helps.


Thanks will keep an eye out for it.

I will almost certainly invest in Elk UPURS at some point by the way! Domestic harmony required that I cut down on the gadget acquisition for a bit (hence the Elk project :lol: )

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

Re: Electron Game Server / UEF JavaScript

Postby davidb » Tue Oct 31, 2017 1:09 pm

MartinB wrote:Incidentally, Arcadians is sadly one of the UPCFS ‘doesn’t work’ games on the Elk, although it does go right through the loading sequence before crashing :roll:. If it did work, then I’d be claiming that ‘world speed record’ because UPCFS loads the entire UEF in less than 10 seconds.... :wink:

If the other Acornsoft games work then it's a bit surprising if Arcadians doesn't. However, it loads the main game in a fairly non-standard way - despite Acorn preaching to users that they should use documented system calls - so I could imagine that it might trip up a filing system that differed from the cassette filing system in some key way.

One trick with Arcadians, as with other Acornsoft titles, is to disable the lock flag, *LOAD the main game, and call the code in the last three bytes of the file which is a JMP to the correct entry point. My UEF2ROM recipe for Arcadians doesn't do this but still manages to trick the Electron OS from loading it from ROM, so I don't know exactly why it might fail for UPCFS. Anyway, as you said, this discussion possibly belongs in another thread. :)

User avatar
MartinB
Posts: 4591
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Electron Game Server / UEF JavaScript

Postby MartinB » Tue Oct 31, 2017 10:53 pm

David wrote:Anyway, as you said, this discussion possibly belongs in another thread. :)

I've taken it back to the UPCFS thread that Colin linked to... :)


Who is online

Users browsing this forum: No registered users and 1 guest