Deploy-and-run from PC to Beeb?

Development tools discussion area.
Post Reply
VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Deploy-and-run from PC to Beeb?

Post by VectorEyes » Mon Aug 06, 2018 8:24 am

Morning all,

I'm playing around with Beeb development and at the point where I want to be able to build using BeebAsm on my PC, and deploy-and-test to my Master. It's got an internal DataCentre, but currently it's a bit of a pain because I have to copy files to a USB stick, then plug it into the DataCentre and import the SSD image. (Doubly annoying because I'm trying to avoid cutting the case further, so I have to run with the case screws unplugged so the USB cable can hang out!)

This got me thinking about ways you could build on PC and deploy without having to swap USB sticks around. First thing I tried was something I saw on one of the Retroclinic YouTube videos where Mark uses a wifi-enabled SD card plugged into a USB<->SD adaptor plugged into the DataCentre to deploy files over wi-fi. So I bought a SanDisk Connect... Which turned out to be basically useless because 1. It drops connection and is generally flakey, 2. It only uses a Web interface, no proper SMB network share, and 3. It has a power switch on the side that you have to press to turn on the WiFi! Oh and 4. You have to disconnect from the internet and connect to its WiFi access point so you lose 'net access while you're developing which turns out to be a total pain.

Now I'm pondering other approaches to this. Has anyone else done something similar? Things that spring to mind:

- get a better WiFi USB stick/adapter, one that can be set up to connect to my home WiFi and present itself as a SMB share.
- USB switcher so I can plug the stick into my PC and the Beeb at the same time and flip between them.
- make use of one of the other ports to be able to actually deploy directly using receiver/listener program on Beeb side, with some kind of intermediate device (RaspPi, ESP32 etc) in between.

But I'd really like to keep it as simple as possible, which is why the "deploy to usb stick over wi-fi" was so appealling... If it had actually worked!

Does anyone have any suggestions? I'm hoping that given how many people do Beeb development here, somebody's already solved this. Or does everyone develop on emulators and then occasionally check on real hardware?
Last edited by VectorEyes on Mon Aug 06, 2018 8:25 am, edited 1 time in total.

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Mon Aug 06, 2018 8:57 am

I develop on a PC, both standalone code proggies and sideways roms. I do exactly what you want to do using, perhaps predictably, UPURS and specifically using UPLOAD which simply allows you to do a *LOAD directly from the PC, albeit via a cable.

User avatar
BigEd
Posts: 1965
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by BigEd » Mon Aug 06, 2018 9:13 am

I have been known to paste smallish programs over the RS423 serial port, but UPURS is a much faster and more convenient interface: it's a simple cable, and a ROM.

colonel32
Posts: 48
Joined: Wed Jan 18, 2017 7:59 pm
Location: USA
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by colonel32 » Mon Aug 06, 2018 3:02 pm

Can you plug a FlashAir into your datacenter?

The newer ones have WebDAV, so you can map a drive on Windows etc.

I use one for Spectrum development, it works pretty well.
Last edited by colonel32 on Mon Aug 06, 2018 3:05 pm, edited 2 times in total.

VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by VectorEyes » Mon Aug 06, 2018 5:00 pm

colonel32 wrote:
Mon Aug 06, 2018 3:02 pm
Can you plug a FlashAir into your datacenter?

The newer ones have WebDAV, so you can map a drive on Windows etc.

I use one for Spectrum development, it works pretty well.
I think you can. After some faffing around with the Sandisk Connect drive I realised that I could actually map it using WebDAV and Windows could see it... but it was incredibly flaky, dropped connections, wouldn't copy files, etc. If the FlashAir ones are better I might consider one!

Just looked at the specs and it looks like you can even still use the internet while connected if you make use of their 'internet pass-thru' mode, but it basically sits in the middle and you connect to your router through the FlashAir which sounds a bit inefficient. I'd love it if there was one of these devices which would just sit on your WLAN and be a Samba share!

Thanks for the suggestion though, I might give one a go.

(Also thanks to everyone else for the UPURs recommendation! That also looks like a good solution).

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Mon Aug 06, 2018 7:55 pm

VectorEyes wrote:(Also thanks to everyone else for the UPURs recommendation! That also looks like a good solution).

It is, and it just works. Way better than all this modern temperamental twaddle.... :lol:

(Also, with the built-in pseudo filing system UPCFS which replicates the CFS but at lightning speed, you can LOAD and CHAIN Basic programs and *RUN machine code - all directly from your PC 8) )




.
Last edited by MartinB on Mon Aug 06, 2018 7:56 pm, edited 1 time in total.

User avatar
BigEd
Posts: 1965
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by BigEd » Mon Aug 06, 2018 7:58 pm

I suppose this is the link for UPURS:
https://www.retro-kit.co.uk/UPURS/

User avatar
Elminster
Posts: 2589
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by Elminster » Mon Aug 06, 2018 8:56 pm

If it is a master you can also use real wired Ethernet but you still have to faff about changing files to valid bbc programs etc. So not really any easier than UPURS and you need to buy the Ethernet card. I think it is much faster but not ever done any comparison timings.

Commands are more complex than upurs so i used to chain a program that set all the f keys.

I did have issue with compatibility between Ethernet and data centre though.

Which is fastest/easiest/cheapest all thing considered is hard to say (unless you are Martin, I know what he will say :) )

User avatar
myelin
Posts: 430
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by myelin » Mon Aug 06, 2018 9:26 pm

If you can get UPURSFS (HostFS:UPURS) running well, it lets you run binaries directly off an attached PC, using the UPURS bit-banged 115k2 serial port.
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
kieranhj
Posts: 700
Joined: Sat Sep 19, 2015 10:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by kieranhj » Mon Aug 06, 2018 9:31 pm

I like the idea of UPURS to deploy directly to a Beeb but then realised no modern PC has an RS232 port (my laptop certainly doesn’t) - does this work through a USB to RS232 converter? If so, can anyone link to any they recommend?
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by VectorEyes » Mon Aug 06, 2018 9:36 pm

I've become spoiled I suppose. I've spent the last 10 years working on systems where you build, hit the "deploy and run" shortcut, and whatever piece of hardware you were targetting wakes up, receives its payload of code and data, and runs it!

Ok, I will be digging into UPURS. First question is to establish whether you can run the PC-side host software in such a way that it's easy to build from BeebAsm to a disc image in a specific folder on the PC, then have the Beeb boot or otherwise access the new image (maybe by importing to a DataCentre drive, that would be OK, I could set up shortcuts to speed up the import.)

Ah, @Myelin posted while I was writing that.... So what is the nature of the file system on the PC side? Is it accessing disc images, or does the Beeb literally gain access to a folder on the PC? In which case how does it handle the load/run metadata?

@Kieranhj the UPURS Website showed a video of a pc usb to rs232 converter in use, so I think that's how people are using it with modern PCs.

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Mon Aug 06, 2018 11:01 pm

Yes, the one below has always been my recommendation because it’s based on the reliable FTDI chipset and importantly, like it’s partner UPURS, it also just works... =D>

(Indeed, I developed UPURS from day one around this very adaptor.)

http://www.tronisoft.com/shop/adaptors- ... -90cm.html


3DFDAB66-BE89-4DB6-B8BF-87469F641EC1.png


.
Last edited by MartinB on Mon Aug 06, 2018 11:05 pm, edited 1 time in total.

User avatar
Elminster
Posts: 2589
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by Elminster » Mon Aug 06, 2018 11:28 pm

MartinB wrote:
Mon Aug 06, 2018 11:01 pm
Yes, the one below has always been my recommendation because it’s based on the reliable FTDI chipset and importantly, like it’s partner UPURS, it also just works... =D>
You should probably pointed out that unless they already have a usb rs232 device kicking about they want to try, it is not worth buying anything else as high chance it won’t work. Don’t try and save a buck and go for you recommendation.

VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by VectorEyes » Mon Aug 06, 2018 11:50 pm

OK, and where do we get the Beeb user port -> serial cable? Or do I need to get the soldering iron out again...? :)

EDIT: Found the UPURS manual, working my way through it. Er, Martin, I may be contacting you about sourcing a cable... :)

Second problem, looks like Tubehost doesn't like Windows 10... :(
Last edited by VectorEyes on Tue Aug 07, 2018 12:04 am, edited 1 time in total.

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Tue Aug 07, 2018 11:36 am

I franchised-out the cable making to others on here because I constantly have Beeb-project bandwidth issues 🙄. I do still make the odd one and I wouldn’t see you stuck but just now I’m away on hols for a couple of weeks plus, I’m not convinced I have the D-types in stock so overall, if you need me for a cable, it could be three weeks or so ☹️. That’s rubbish I know so maybe there are other willing and able volunteers looking in who could help you....?

Also, UPURS Tubehost isn’t mine so I can’t help with that I’m afraid.
Last edited by MartinB on Tue Aug 07, 2018 11:38 am, edited 1 time in total.

VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by VectorEyes » Tue Aug 07, 2018 3:11 pm

MartinB wrote:
Tue Aug 07, 2018 11:36 am
I franchised-out the cable making to others on here because I constantly have Beeb-project bandwidth issues 🙄. I do still make the odd one and I wouldn’t see you stuck but just now I’m away on hols for a couple of weeks plus, I’m not convinced I have the D-types in stock so overall, if you need me for a cable, it could be three weeks or so ☹️. That’s rubbish I know so maybe there are other willing and able volunteers looking in who could help you....?

Also, UPURS Tubehost isn’t mine so I can’t help with that I’m afraid.
I'm away for a few weeks myself... let's give it a few weeks and then I can beg for somebody to make me a cable!

I'll see whether I can work out why Tubehost (JGH version from mdfs.net) won't launch, and see if I can fix it if it's simply missing some DLLs. If not might try to see whether I can get sweh's Perl version running under Windows somehow.

People who use UPURS, I have a question for you! What are you using on the PC side?

- JGH's Tubehost on Windows? If so which version of Windows are you on?
- sweh's Perl Tubehost? If so on Linux, or Windows?
- Something else?

Thanks!

User avatar
BigEd
Posts: 1965
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by BigEd » Tue Aug 07, 2018 3:15 pm

I think I've used PerlHost, on Linux, and I'm pretty sure hoglet has too. (It's been a while.)

Edit: reference http://mdfs.net/Software/Tube/Serial/ because I keep getting confused about host software vs client software.
Last edited by BigEd on Tue Aug 07, 2018 3:23 pm, edited 1 time in total.

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Tue Aug 07, 2018 4:18 pm

Well, if you don’t mind a few weeks lead-in then I’ll sort the cable for you, and an UPURS v5 eprom if you need help with that too? (Although you can run nearly all the UPURS utilities from disc, the eprom is much more convenient for a development environment which is what this is all about.) I normally charge something like £11 for the two, UK posted.

Personally, as a significant Beeb & Elk software, firmware and hardware developer (and I mean ‘significant’ in the quantity sense, others must judge the quality 😜), I only find that I need the UPURS toolset driven simply by a serial terminal at the PC where for me and most others, that’s achieved through the recommended Hercules for Windows. If it’s a single file, I simply fire over the object code straight to memory or to sideways ram or if it’s a more complex suite, I use real floppies (but could be Gotek or SD etc.) building the DFS disc images in DFS Explorer (Jon Welch) and I use UPURS to send over and write the disc image. In all cases, the transfers take literally seconds and I have a pretty slick development cycle.... :D 8)


.
Last edited by MartinB on Tue Aug 07, 2018 4:22 pm, edited 2 times in total.

User avatar
myelin
Posts: 430
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by myelin » Tue Aug 07, 2018 5:22 pm

Being the one who originally suggested UPURSFS/HostFS, I should jump in here to confirm what MartinB just said! Standard UPURS is pretty bulletproof once you get your cable sorted out, and *UPLOAD will do most things you need, then *UPSSD and *UPDSD will let you upload entire disc images. So if you're actually looking to get things done rather than mess around trying to optimize your build pipeline, using standard UPURS is an excellent idea.

If, on the other hand, you're looking to optimize the hell out of things without regard for how long it takes to set up, UPURSFS/HostFS is pretty magical once it works :) There's a thread here about getting it to work, that started from my experiments with using a USB microcontroller with its own serial adapter code instead of the (strongly) recommended FTDI cable, that would be worth reading.
Last edited by myelin on Tue Aug 07, 2018 5:23 pm, edited 2 times in total.
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Tue Aug 07, 2018 8:26 pm

Phillip wrote:So if you're actually looking to get things done rather than mess around trying to optimize your build pipeline, using standard UPURS is an excellent idea.
Ha! It’s important to point out that unlike many folk on here, I’m not from a computer or software background and so much of the stuff that people get up to just leaves my eyes totally glazed over. Looking in therefore, I think I see many in the retro computer world that appear to expend significant effort in bringing their Acorn environment into the modern age, or as Phillip phrased it, ‘optimising their build pipeline’, but then having got there, not really doing much more in the actual productive sense with these fancy toolsets and set-ups. Myself however, being a relative Luddite, loves producing things for the Beeb that work, that ‘does stuff’ and that is fun to use so my approach to tools is generally, the simpler the better and ones that are no more complicated than I need to support my Beeb projects.

I suppose the point of all that flannel is just to explain that when I say that all I use is floppies and UPURS to develop on the Beeb and Elk, I’m aware that my approach isn’t necessarily widely portable because I’m significantly disconnected from many on here in the ‘software systems’ sense. So, in the case of the UPURS example, I can see why people might find UPURS plus Hercules far too ‘trivial’ and would feel much more comfortable following Phillip’s excellent refinement of UPURSFS/HostFS.


.
Last edited by MartinB on Tue Aug 07, 2018 8:51 pm, edited 2 times in total.

User avatar
Elminster
Posts: 2589
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by Elminster » Tue Aug 07, 2018 8:33 pm

Or in other words your build pipeline uses lead pipes, a well and a hand pump :evil:

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

Re: Deploy-and-run from PC to Beeb?

Post by MartinB » Tue Aug 07, 2018 8:36 pm

Pretty much, except no hand pump - just a bucket on a rope......

User avatar
myelin
Posts: 430
Joined: Tue Apr 26, 2016 9:17 pm
Location: San Francisco, CA, USA
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by myelin » Tue Aug 07, 2018 8:55 pm

MartinB wrote:
Tue Aug 07, 2018 8:26 pm
Looking in therefore, I think I see many in the retro computer world that appear to expend significant effort in bringing their Acorn environment into the modern age, or as Phillip phrased it, ‘optimising their build pipeline’, but then having got there, not really doing much more in the actual productive sense with these fancy toolsets and set-ups.
You just described me perfectly =D>
SW/EE from New Zealand, now in Mountain View, CA, making BBC/Electron hardware projects for fun.
Most popular: fast serial port, FX2+PiTubeDirect Tube/Cartridge adapter, USB cart interface.

User avatar
Elminster
Posts: 2589
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by Elminster » Tue Aug 07, 2018 9:39 pm

I am waiting for Siri/Alexa support in UPURS

VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by VectorEyes » Tue Aug 07, 2018 9:53 pm

Point well made -- and taken on board! -- about the perils of optimising your build pipeline instead of getting on with actually developing something!

Martin, thanks so much for offering to make the cable and ROM. I'll send you a private message a bit later.

To be honest, UPURS plus Hercules seems like a pretty efficient approach. I'd like to get upursfs running but if I can't get Tubehost (windows or Perl versions) running on my Win10 machine then Hercules it will be!

VectorEyes
Posts: 110
Joined: Fri Apr 13, 2018 1:48 pm
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by VectorEyes » Wed Aug 08, 2018 10:21 am

BigEd wrote:
Tue Aug 07, 2018 3:15 pm
I think I've used PerlHost, on Linux, and I'm pretty sure hoglet has too. (It's been a while.)

Edit: reference http://mdfs.net/Software/Tube/Serial/ because I keep getting confused about host software vs client software.
A bit of hacking around last night suggested to me that nobody has been using the Perl version on Windows. Windows would need to use Win32::SerialPort instead of Device::SerialPort, but there are other linux-specific Perl commands (use of stty, which apparently doesn't exist on Windows) in the UPURS-specific codepaths.

It can probably all be worked around but it's not going to be trivial. I'm going to move back to trying to get the Win32 TubeHost.exe working on Win10 for a day or two.

EDIT: SOLVED! Tubehost.exe will only run if your PC actually has some COM ports. If your PC literally has none then it starts up then immediately quits.
Last edited by VectorEyes on Wed Aug 08, 2018 2:47 pm, edited 1 time in total.

User avatar
sweh
Posts: 1933
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Deploy-and-run from PC to Beeb?

Post by sweh » Sun Aug 12, 2018 2:08 pm

VectorEyes wrote:
Wed Aug 08, 2018 10:21 am
A bit of hacking around last night suggested to me that nobody has been using the Perl version on Windows. Windows would need to use Win32::SerialPort instead of Device::SerialPort, but there are other linux-specific Perl commands (use of stty, which apparently doesn't exist on Windows) in the UPURS-specific codepaths.
I tested it on Windows XP a couple of times (with the "-s" flag), and it worked there, but it definitely hasn't been rigorously tested by me on that platform.

I've no idea how performant it is because it uses Device::SerialPort for the comms (which did work on the perl version I used on Windows). The "-U" path is pretty much Linux optimised. "-s" mode should work with a UPURS cable (eg "TubeHost -s COM4 115200") but may be slower than on Linux ("TubeHost -U /dev/ttyUSB2 115200").
Rgds
Stephen

Post Reply