6809 and FLEX

discussion of beeb/electron applications, languages, utils and educational s/w
dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Tue Oct 17, 2017 3:56 pm

Did you get anywhere with this Rob? It would be nice to get FLEX running on my Master and then I could have a go at tweaking the BAS6809 port to work on Flex

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Tue Oct 17, 2017 5:01 pm

dominicbeesley wrote:Did you get anywhere with this Rob? It would be nice to get FLEX running on my Master and then I could have a go at tweaking the BAS6809 port to work on Flex

Yes - I now have versions that work on the DC and on GoSDC.

I'll dig them out and post them on here later tonight.

EDIT: Added DataCentre and GoSDC compatible FLEX disk images. (I think these are the correct versions!)
Attachments
BBCFLEX.zip
(260.15 KiB) Downloaded 5 times

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Wed Oct 18, 2017 10:53 am

Thanks Rob,

I just gave it a quick go here on a Master 128 with Matchbox
Copied BBCFLEX_DC.DSD to stick
*IMPORT -02 BBCFLE~1.DSD
Shift-Break - it just hangs with an odd low level whir from speaker

I also tried soft-loading the latest 6809-client (1.05) and doing *RUN !BOOT but get the same results

Any ideas? Does it require an older version of the matchbox firmware?

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Wed Oct 18, 2017 11:25 am

Does *FLEX not work?

For some reason, SHIFT-BREAK has never worked.

It's also possible that this is not the correct version - I'll dig out the USB stick I use with my DC.

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Wed Oct 18, 2017 11:33 am

Similar, it just hangs, if it's not obvious I'll try and dig out the debugger later and see where its getting stuck...

What version of Flex is it based on and do you have the source for the beeb specific drivers - it would help to see where it's getting stuck. From the noise from the speaker it sounds like its in a tight loop...

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Wed Oct 18, 2017 11:42 am

It has to be the wrong image then - I thought it was the correct one as the timestamp tallied with the date of the RO SW Show.

I'll pull the working one off the DC USB stick and repost.

It's based on FLEX 3.01 which is the last official release.

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Wed Oct 18, 2017 11:51 am

Right - here's the version off my DC. I've just tested it and it works.

However, I'd forgotten that you must do *DTRAP to redirect disk accesses to the RAM drives. Otherwise, it'll hang...

SHIFT-BREAK will load it but you need to enter a keypress before FLEX will start. *FLEX or *!BOOT shouldn't need this.
Attachments
BBCFLEX9.zip
DataCentre compatible FLEX boot disk
(131.35 KiB) Downloaded 10 times

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Wed Oct 18, 2017 12:13 pm

Thanks Rob, you're a star.

That works! I'll have a quick go at getting BBC Basic on there, no idea yet how I create a flex format SSD!?? Is there a way to run *import from within flex or do I have to run MON to drop back to the supervisor prompt....lots of questions...

Which version of Flex is this - I ask as I'm going to have a go at porting it to my 6809 homebrew thing at some point and it would be good to use the same version. Hopefully I can use what you have as a starting point if that's ok with you?

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Wed Oct 18, 2017 12:43 pm

All my stuff is based on 3.01 which is the last official release.

To create the disk, I used a tool called "FloppyMaint" that I got off the Flex User Group. I think I posted it in this thread - if not, I'll mail it to you. This allows you to create various flavours of FLEX disks (as there wasn't an official standard) - I used 80 tracks/10 sectors/2 sides to match the Beeb.

Then I used a hex editor to put my custom DFS catalogue and boot loader in the first couple of sectors.

If you just want to add some files to the existing image, you can just load it into FloppyMaint and add the files. (You may need to rename the image from .dsd to .dsk first though.)

I can send you the FLEX 3.01 sources, the FLEX Adaptation guide and all of my driver routines (although I may have already done so previously?).

To build FLEX, I used the a09 assembler on Windows - it has an option to generate FLEX binaries (i.e. with the transfer addresses etc.). The only gotcha I remember was having to join the various parts in the correct order with the terminal I/O stuff at the end.

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Wed Oct 18, 2017 1:20 pm

Sorry Rob, I think you did send them. I'll fire up my old PC tonight and have a look. :oops:

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Wed Oct 18, 2017 2:51 pm

No worries - I can send again if it's easier...

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Wed Oct 18, 2017 10:45 pm

Thanks Rob,

I've found some of it - sorry for the confusion, my memory is not what it was! I'll have a look at the code later in the week.

I'm not sure I've got it all:
- adaptation guide
- floppymaint
- flex_srces.dsk

Are your routines on that .dsk image - I had a poke through them earlier and couldn't find them...or at least nothing that looked as I was expecting...

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Thu Oct 19, 2017 5:47 pm

dominicbeesley wrote:Are your routines on that .dsk image...

No - I think that disk image came from the Flex User Group so any drivers will be for some other machine.

I'll dig out the source code for my drivers and post them here.

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Thu Oct 19, 2017 9:13 pm

Here are my disk driver and terminal I/O driver. This is the DC version - I had to simplify the disk driver to get it to work so it doesn't do things like verify.
Attachments
FLEX Drivers.zip
(2.14 KiB) Downloaded 7 times

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Fri Oct 20, 2017 10:34 am

Thanks Rob,

That looks like it should work "out of the box" on my hardware, once I've sorted out a linear memory map, and OSWORD 7F...I was hoping to have the mk.2 hardware laid out by August, looking more like after Christmas at this rate...

I'll have a punt at BBCBasic in the near future but will need to do a bit of mugging up on Flex first...should be relatively easy id I assume BBC VDU drivers.

Thanks for digging this out!

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Fri Oct 20, 2017 10:51 am

I'm up to my eyeballs in making more VideoNuLA boards this week but I might be able to look at putting your BBC BASIC on FLEX next week. (Unless you'd prefer to do it yourself.)

My plan is to have a Pi co-pro running at the RO London show so it would be a good thing to show off...

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Fri Oct 20, 2017 11:18 am

It's up to you, I've got plenty on my plate I was just going to have a desultory play with it over the weekend. I suspect that it will require some major surgery to make it play nice i.e. it expect a fixed string buffer at &600 and variables at &400. I'll have a quick look at this today to see about changing it..

My knowledge of Flex is nil so far, I'm not even sure if I _need_ to make it relocatable or if it will work ok with having these fixed areas? If it is possible to grab all RAM from &400 up to &C000 it should be easy! :mrgreen:

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Fri Oct 20, 2017 11:43 am

You should be able to grab everything from $0000 to $BFFF.

Not sure whether I sent you this - it's the FLEX Advanced Programmer's Manual and covers the memory map and system routines etc.
Attachments
Flex 6809 Advanced Programmers Guide.zip
(117.12 KiB) Downloaded 6 times

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Fri Oct 20, 2017 12:13 pm

Aha, I was looking for just this pdf! I new there was something somewhere that details .BIN format! I've just spent the last hour looking and it does look like it should be fairly easy to port, I've started a branch of it now. And will have a quick go at hacking something together.

I'd got myself confused - it's OS-9 that does relocatable stuff.

Do you use SVN at all? I could give you access to my code on there - failing that GitHub?

D

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Fri Oct 20, 2017 4:35 pm

I've made start, let me know if you'd like the code so far. The whole Flex thing is a bit of a mystery but I think I'm getting there. I now have something that should at least get to a prompt and allow entry of code but I'm not sure how to load an intel hex file into Flex...I suspect easiest will be to make a hex to cmd perl script...

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Fri Oct 20, 2017 5:08 pm

dominicbeesley wrote:I've made start, let me know if you'd like the code so far.

Yes please. I'm not really much kop with SVN or git but can give it a go if needed.

dominicbeesley wrote:I'm not sure how to load an intel hex file into Flex...

I just build the source with a09's FLEX binary option and then add it to the FLEX boot disk with FloppyMaint. (I can try building it like this if you can point me at the code.)

dominicbeesley
Posts: 466
Joined: Tue Apr 30, 2013 11:16 am

Re: 6809 and FLEX

Postby dominicbeesley » Fri Oct 20, 2017 11:24 pm

Thanks Rob,

I ended up writing a quick script that builds a Flex binary, which proved to be quite simple. I've got it sort of working - no Escape detection yet or LOAD/SAVE/CHAIN.

I've sent you and email with the source code - let me know if it doesn't come through - it may get blocked as it's quite large

D

RobC
Posts: 1823
Joined: Sat Sep 01, 2007 9:41 pm

Re: 6809 and FLEX

Postby RobC » Sat Oct 21, 2017 7:48 am

Yes, thanks - it's come through. I'll try to take a look at it next week.


Return to “software: other”

Who is online

Users browsing this forum: No registered users and 3 guests