P.R.E.S. Advanced BASIC Editor ABE - ROM and Cartridge

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
1024MAK
Posts: 8897
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by 1024MAK » Sat Mar 01, 2014 12:24 pm

Hi Dave H :D
daveejhitchins wrote:I have been able to recover the contents of the cartridge version of the BASIC editor PLD :D
daveejhitchins later wrote:I'll still do the .jed to fuse map exercise though (it's the Cartridge version of the .jed I have - But the schematic of the Single ROM version - Doh!).
daveejhitchins also wrote:I gave-up on the .jed to fuse mapping as soon as I looked at the data I have. I realised that the cartridge also has some decoding for the extra ROM/RAM socket. So I must have used a few more diodes in the address decoding. This would make it meaningless for the stand alone version.
I know there are differences between the two versions. However, at this stage, in order to understand how the whole system is suppose to work, would it be helpful to use the cartridge version of the .jed. (with any extra diodes) and then ignore the outputs for the extra ROM/RAM socket?

Do you remember which came first, the cartridge version or the single DIL ROM version? :?: I presume, as the Electron owner was your primary market, development work mainly took place on Electron systems.

The thought that occurred to me, was that during the original prototype phase (or what-ever you called it) back in the day, you found problems. Some forum members recently (last two or three years) have found unexpected glitches that can affect SRAM contents (when a SRAM is used as sideways ROM). So maybe during development work some similar problem was found. As a result, the PLD and the ROM were altered to “work-around” the discovered problem. Maybe a second flip-flop? Maybe that's what some of this unknown memory accessing is doing? Of course, I'm just guessing here :?

The pin 1 ROM to PLD connection problem. Are you sure that the ROM pin 1 is only connected to the PLD?
Often EPROM Vpp is connected to +5V. But not always (see below).
Can you think of any reason why the PLD would need to have an input to detect if it was in a ROM socket?

Beeb ROM sockets:
retroclinic wrote:
MartinB wrote:....No, you can use them as 27128's by just programming the relevant quarter. In the Beeb, pins 1 and 27 are tied high at the rom sockets and these equate to a14 and a15 on a 27512.
Pin 27 is tied high, but in a Model B pin 1 is floating, and not connected to anything, therefore unless you tie it, using a 27512 will give unpredictable results.

It's best to perform this mod:

http://www.retroclinic.com/acorn/swr/swr.htm

To use 27512s (and SWR if you want it, or just leave the SWR bit out), that way you get the full benefit and can use one as 4 different ROM images.

Mark.
<Link>

I'm sorry if this just adds more confusion :lol:

Mark

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 01, 2014 4:57 pm

1024MAK wrote:Hi Dave H :D
daveejhitchins wrote:I have been able to recover the contents of the cartridge version of the BASIC editor PLD :D
daveejhitchins later wrote:I'll still do the .jed to fuse map exercise though (it's the Cartridge version of the .jed I have - But the schematic of the Single ROM version - Doh!).
daveejhitchins also wrote:I gave-up on the .jed to fuse mapping as soon as I looked at the data I have. I realised that the cartridge also has some decoding for the extra ROM/RAM socket. So I must have used a few more diodes in the address decoding. This would make it meaningless for the stand alone version.
I know there are differences between the two versions. However, at this stage, in order to understand how the whole system is suppose to work, would it be helpful to use the cartridge version of the .jed. (with any extra diodes) and then ignore the outputs for the extra ROM/RAM socket?
I'll have to complete the fuse mapping exercise, next week. Not a problem, however, I'm not sure it will help! We'll see.
1024MAK wrote:Do you remember which came first, the cartridge version or the single DIL ROM version? :?: I presume, as the Electron owner was your primary market, development work mainly took place on Electron systems.
I believe it was the ROM version, as we had the AP6 available at the time and it would have been the lowest cost option.
1024MAK wrote:The thought that occurred to me, was that during the original prototype phase (or what-ever you called it) back in the day, you found problems. Some forum members recently (last two or three years) have found unexpected glitches that can affect SRAM contents (when a SRAM is used as sideways ROM). So maybe during development work some similar problem was found. As a result, the PLD and the ROM were altered to “work-around” the discovered problem. Maybe a second flip-flop? Maybe that's what some of this unknown memory accessing is doing? Of course, I'm just guessing here :?
We didn't see the 'RAM' issue BITD! The first I heard of it was on this forum!! We wouldn't have used RAM anyway!
1024MAK wrote:The pin 1 ROM to PLD connection problem. Are you sure that the ROM pin 1 is only connected to the PLD?
Often EPROM Vpp is connected to +5V. But not always (see below).
Can you think of any reason why the PLD would need to have an input to detect if it was in a ROM socket?
Definitely only connected to the PLD. It's a single sided board so tracing tracks is dead easy. I'm stuck on this one. If it were an output from the PLD I could understand it . . . But . . . I'll post a photo of the board, next week.
1024MAK wrote:Beeb ROM sockets:
retroclinic wrote:
MartinB wrote:....No, you can use them as 27128's by just programming the relevant quarter. In the Beeb, pins 1 and 27 are tied high at the rom sockets and these equate to a14 and a15 on a 27512.
Pin 27 is tied high, but in a Model B pin 1 is floating, and not connected to anything, therefore unless you tie it, using a 27512 will give unpredictable results.

It's best to perform this mod:

http://www.retroclinic.com/acorn/swr/swr.htm

To use 27512s (and SWR if you want it, or just leave the SWR bit out), that way you get the full benefit and can use one as 4 different ROM images.

Mark.
<Link>

I'm sorry if this just adds more confusion :lol:

Mark
No, as I'm well confused already. I should (hopefully) have a better understanding of what's going on, once I 'see' the output of the LA. One question I still have is: which address switches to which 16K block of code? Maybe a further 'look' into the sequence of events would tell us that?

My testing, so far has resulted in having to use one extra level of delay (feeding the clock through the PLD a second time) before I could get the 'help' to work. However, pressing the Escape key resulted in a crash (hang). At that point I tried negating A14 which didn't improve things. And then my evening meal was on the table :lol:

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by MartinB » Sun Mar 02, 2014 10:13 am

Dave EJH wrote:One question I still have is: which address switches to which 16K block of code? Maybe a further 'look' into the sequence of events would tell us that?
I don't think that can be fully answered from the rom code, it really needs to be established from the PLD end. I've had a further look at the two images and the lower one in the 32k you posted is definitely the 'primary' image. It can be installed alone as a sideways rom and the utility can then be entered and run. e.g. .....
BE.png
The second image is curious in that whilst it 'claims' to be a sideways rom having a C2 type with both language and service entry points (as per the primary), if it is present in sideways rom space, the machine just crashes. At first sight it looks as if during start-up, following power-on or <Break> when the OS offers it initialisation calls, it doesn't respond or return. Now, this may be quite normal because the secondary isn't usually presented to the OS since it hides covertly behind the primary rom and is only transiently switched-in when its code is required. Alternatively of course, the secondary half of the image you have posted may be corrupt? :?

In summary then, if we assume the images are ok and that the secondary intentionally can't live alone as a sideways rom, the primary must therefore always be the default selection by the PLD after reset. Hence, we can further deduce that if the primary/secondary image order is correct as you have posted it, the rom A14 output from the PLD must be low following a reset to select the primary image, assuming a 27256 is used. Additionally, we also know that the primary (lower 16k) switches to the secondary (upper 16K) by reads of $BFF0, $BFFC and $BFF4 and that the secondary switches back to the primary using $BFF0, $BFF8 and $8000.

(All observations apply to a Beeb and an Elk btw)

I think that maybe answers your question....? :-k

User avatar
jgharston
Posts: 3576
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by jgharston » Sun Mar 02, 2014 10:45 am

MartinB wrote:The second image is curious in that whilst it 'claims' to be a sideways rom having a C2 type with both language and service entry points (as per the primary), if it is present in sideways rom space, the machine just crashes.
The second image crashes when used on its own as its service routine attempts to page in the first image to call its service routine.

It occurs to me that a little bit of tweeking could change the paging code to swap between sideways ROMs instead of PLD banked images, like the sideways RAM version of InterWord.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
jgharston
Posts: 3576
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by jgharston » Sun Mar 02, 2014 11:38 am

jgharston wrote:It occurs to me that a little bit of tweeking could change the paging code to swap between sideways ROMs instead of PLD banked images, like the sideways RAM version of InterWord.
Yes, here we are:
EDITORA100
EDITORB100

The two ROM images need to be in adjacent ROM slots - offset by EOR #1, eg 8/9 or 4/5, etc. Doesn't matter which way around they go.

This is done by changing the bank switching code to:

Code: Select all

PHA
LDA &F4
EOR #1
STA &F4
STA &FE30
PLA
JMP (&BFEE)
which is exactly the same length as the previous code. I wouldn't be surprised if that's the original code from when the ROM was being developed and before it was put into a single banked ROM.

PS: I've added the OSWORD &B5 call to the Wiki.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by MartinB » Sun Mar 02, 2014 12:32 pm

Oh well, you published before me Jonathan - exactly what I'd decided to do! I was only hanging back because I hadn't got straight in my mind whether a similar idea could be used on the Elk given that any initial switching out of Basic requires more steps than we have here. Anyway, thanks and good to see it works but it still doesn't actually solve Dave's PLD riddle I guess... :wink:

Edit : No, the switching code will never be used to deselect Basic so the only difference for the Elk is that the rom paging register is at $FE05 and not $FE30.

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sun Mar 02, 2014 6:02 pm

Thanks, everyone. It's good to know the code is OK. At least people can be using the editor while I sort out the PLD. I'll persivere as a valuable ROM position can be saved and it would mean I can replicate the original, which is my goal.

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Tue Mar 11, 2014 10:21 pm

Just a quick update on my progress . . .

I have a version of PLD that:
1) Powers-up with A14 Low, the switched address line, also reverts to Low after a break or control break. This is important to ensure that the ROM is in the correct 16K bank.

2) Switches A14 reliably. I can change it to switch on either address read locations.

But . . . Still not working :oops: :evil:

I have several EPROMs - One from a working product and various 'master' EPROMs that were used when programming production units - including the P.R.E.S. and ICS version. I'll have to compare the code within these EPROMs as they don't all behave the same!!

My 'simple' version of the switching PLD had a few problems in that it seemed to switch randomly. I've still to look into what's causing that. So I incorporated an RS flip flop that was 'set' using a read from BFF0 enabling the clock. A following read from either BFF8 or BFFC will set D either H or L and also produce a clock signal (just in case - I've delayed the clock by going through the PLD twice). The clock also 'resets' the RS disabling the clock, as protection against any spurious.

It all seems to switch cleanly and reliably. So why it isn't working is a problem I've still to solve.

Monitoring A14 with a 'live' ROM in place results in A14 going H once the ROM is entered using *BE. It seems to toggle L momenterily when Escape is pressed but goes H again immediately.

More testing, I think.

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Thu Mar 13, 2014 8:35 pm

OK, I thought the switching was reliable, however, running the switching code repeatedly showed-up some problems :-k

This is the PLD code. Any feedback regarding this would be very appreciated. I've tried to give as much documentation as I can, however, if there are any question . . . Ask away.
ABE-TEST3.txt.zip
(1.81 KiB) Downloaded 67 times
Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Fri Mar 14, 2014 8:31 pm

Hmmm! Seems to be stable directly from machine code!
ABE1.PNG
The above image shows a close-up of a read from BFF8 then BFFC. The RS is 'set' with a read from BFF0 followed by the read from F8/FC which resets the RS and flips A14.
ABE2.PNG
This image is identical - just showing more.

The next test is to swap the address and check again (as it's still not working :oops: )

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

User avatar
hoglet
Posts: 8281
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by hoglet » Fri Mar 14, 2014 8:45 pm

What's the duration of the ClkOut pulse? Any chance it might be a bit short?

Dave

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Fri Mar 14, 2014 9:06 pm

hoglet wrote:What's the duration of the ClkOut pulse? Any chance it might be a bit short?
This version of PLD, that I'm showing the output from, has the clock delayed e.g. the clock is generated by a read from BFF8 or BFFC then has to go through the PLD again before it can reset the RS. Therefore the D input has lots of time to stabilise before the clock arrives. So, as the clock resets itself it must have had time to clock the D! But, I might be able to make the clock longer and maybe even clock the D from the pre-delayed clock . . .

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Wed Mar 19, 2014 7:48 pm

aaaaaH! aaaaaH! aaaaaH! aaaaaH!
:oops: doh! doh! doh! :oops:

Just found out I 'probably' have been wasting my time this last week :oops:

I'm testing the BASIC Editor on a Master . . . And - IN THE WRONG SOCKET :oops:

Wasn't getting anywhere so I programmed an EPROM with JG's code - and it didn't work! I obviously don't know about the Master's ROM/RAM sockets. Anyway I pulled the RAMFS (Datacentre) out and used that socket - worked #-o I was so peeved with myself I gave-up for the evening. Tomorrow I will test two versions of the PLD I have that switched A14 reliably but didn't work. Dam, Dam, Dam :roll:

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 22, 2014 8:02 pm

Anything wrong with this code?:

Code: Select all

CLS
DIM TEST% 50
P%=TEST%
PROCMC
50 FOR Y%=4 TO 8
PRINT Y%" ";
INPUT Z%  << added this to step through the ROMs
CALL TEST%
NEXT Y%
GOTO 50
DEFPROCMC
[
SEI
LDA &FE30
PHA
STX &FE30
LDY &BFF0
LDY &BFF8
LDY &8000
NOP
NOP
LDY &BFF0
LDY &BFFC
LDY &BFF4
PLA
STA &FE30
CLI
RTS
]
ENDPROC
This is the result >>:
Test1 1.jpg
Notice something odd?? Look at nCE it's going H not L ?? And I get the same result for all ROMs??? E.g. All ROMs between 4 and 8. I didn't get anything until I changed !nCE to nCE in the PLD code - So now it's looking for a nCE that goes high - (that's the ROM Chip Enable, by the way!!).

I MUST be doing something stupid - but darned if I can see it. So if someone could put me out of my misery I'd be grateful.

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by sweh » Sat Mar 22, 2014 8:10 pm

Should "STX &FE30" be "STY &FE30" because your FOR loop is Y% ?
Rgds
Stephen

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 22, 2014 8:20 pm

Bugger . . . I had a different piece of code that did use X% - missed the darned thing. That's what comes with rushing in between doing (still - We keep having visitors or going away at weekends :roll: ) the bathroom for Mrs H.

I'm going to check it out right now . . . I'll follow up. And, thanks sweh.

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 22, 2014 9:09 pm

OK, Now I'm getting somewhere. Thanks again sweh . . . I'm seeing clock 'glitches' when other ROMs are accessed so I'll need to increase my clock RC delay circuit. simple process as I now have a 220R series resistor fitted with, currently, a 470p cap. I'll double that to 1n (the original value but it didn't have the series 220R) - That should fix that Issue. But all now seems to be working. In fact I'm using the first PLD circuit I mentioned earlier. This leaves me enough pins available to remove the diodes that were originally in the design. Keeps it nice and simple.

Almost there . . . (I said that right at the beginning of this thread :lol: ).

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Apr 05, 2014 12:46 pm

WORKING . . . =D>

So, why has it taken me so long? Are you sitting comfortably? 8)

The problem I had was the requirement to (1) have A14 power up Low. (2) to have A14 go Low when address BFFC was read.

Easy you may think. Well no! This is what I've been trying to achieve all along. No matter what configuration I tried (about 25 :shock: ) I couldn't get the two requirements together. Somehow the original worked - and I haven't managed to work out how I did it BITD. However, I now believe it may be a PLD thing. E.g. I used a different PLD - an Intel 5C032 and now I'm using a Lattice GAL16V8. So its power-up behaviour could be different!

I knew the code was OK after assistance from JG and MartinB (thanks again guys). So, I cheated :oops: I changed two bytes in the code so that a read from BFF8 clocked A14 Low not BFFC.

The actual PLD arrangement is as simple as can be - in fact my first stab from the beginning of this thread:
So, if we use 3FF8 for the clock: 11111111111000

Then an access to 3FF8 and 3FFC will produce a clock signal.

For the D input we'll use 3FFC: 11111111111100

Now: accessing 3FF8 will produce a clock with D = L : and accessing 3FFC will produce a clock with D = H
In fact the only difference is a change for the D input from BFFC to BFF8.

A side effect of this 'simple' circuit is that I can now dispense with the diodes. So all we need is a small PCB and a GAL16V8 :D

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

User avatar
richardtoohey
Posts: 3712
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by richardtoohey » Sat Apr 05, 2014 9:01 pm

daveejhitchins wrote:WORKING . . . =D>
Congrats ... not that I understood much of the thread, but can see it has been a journey! =D>

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Fri Apr 11, 2014 4:28 pm

Further progress: I now have a design that has dispensed with all 4 diodes and the RC delay circuit :D So, BASICally it's just a board, GAL16V8 and an EPROM.

However . . . I could make it work in a 'Dual' ROM socket (e.g. ABE and a second ROM Image in the same EPROM), I think, by putting back 2 of the diodes and the resistor - These are needed as the latest design uses ALL the pins!

Comments . . .

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 07, 2015 8:23 am

Just adding the ABE User Manual here for reference.

A quick update, after reading tom_seddon's post on Acorn's version.

I ended-up with a working version, of the ABE, in my Master. It also had a 'spare' 16K that could be used with anything you cared to program into it. Great, I thought :D

When I started to put-together the menu program for the Mega Games Cartridge (coming along nicely, now) I thought I'd use the ABE. I was using one of my Electron set-ups for the program writing, so, plugged the 'development' ROM into a CARE ROM Cartridge PCB (it won't fit into one of mine :? ) and found it didn't work :shock: Or should I say it didn't work reliably! I think the problem is the different timing within the Electron, with a Plus 3 and Plus 1. I'll have a play with this later and report back.

Here's the Manual:
ABE_USER_GUIDE.pdf.zip
(592.83 KiB) Downloaded 83 times
Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by CMcDougall » Sat Mar 07, 2015 3:00 pm

daveejhitchins wrote:think the problem is the different timing within the Electron, with a Plus 3 and Plus 1. I'll have a play with this later and report back
my bets are if you throw the Plus3 out the nearest highest window =D> , it will then work perfectly :lol: may also be the different Plus1s, as per the UPURS eeprom rom image corruption thing....
ImageImageImage

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 07, 2015 10:32 pm

CMcDougall wrote:my bets are if you throw the Plus3 out the nearest highest window =D> , it will then work perfectly :lol: may also be the different Plus1s, as per the UPURS eeprom rom image corruption thing....
Col . . . At least you're consistent [-X :lol:
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Sat Mar 28, 2015 6:07 pm

Here, at last, the recovered source files for the Advanced Basic Editor.

I'm hoping they're the latest version! I do have another disc (5.25") which I need to recover - Hopefully Daniel will have his KryoFlux at Wakefield (?) I have one but it's no where near ready to use.

I was doing OK, recovering this last disc, when I needed to 'truncate' a file name, before XFERing to RAMDisc - it all went pear shaped then. Firstly with a broken directory which needed a power reset, then a real broken sub directory - followed by a disc error :evil: Ah! The joys of old floppies. I don't think it's 'vital' to have this disc recovered, however, there are three versions - Each one represents a stage during the development - with comments. So it would be good to have the information, even if it's just to ensure that all the latest changes are in the source file that are attached.

Going back to the 'changes' comments on the un-recovered disc: There's an interesting comment that the ROM image worked fine in side way RAM. The feature had to be 'crippled'. However, it's easily put back by finding the right piece of code (buried, seemingly) and replacing it with NOPs.

The attached files:
BASEDMAN.SSD <- The Manual in View format.
BASEDS1.SSD |
BASEDS2.SSD |<- These two discs represent the files from one ADFS disc, with the second being a sub directory from the root. You'll have to work-out the directory name from the MakeROM file. I may have 'truncated' a second filename too!

Dave H :D
The Advance BASIC Editor Source Files.zip
(368.4 KiB) Downloaded 92 times
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Thu Apr 02, 2015 7:22 pm

I've managed to recover the ReadMe files, from the third Source Code Disc - These document, to some extent, the development and changes that were made:

Code: Select all

> Readme1
This disk contains the following files:

Filename       File format     Description
========       ===========     ===========

README         Text            This file! Disk contents.
ERRORS         BASIC           List of new error messages.                      
DOC            View            Documentation changes required.
ROMIMAGE       Machine code    32K image of Editor + Altra
ROMIMAGE2      Machine code    An identical copy of ROMIMAGE

I've also enclosed a 32K EPROM containing ROMIMAGE.

Code: Select all

> readme2

Hello Dave!

Here is the (hopefully) final version of the Basic Editor Plus. The files on
this disk called ROMIMAGE1 and ROMIMAGE2 are identical copies of the full
32K image for blowing.

The changes since the last version I sent you are as follows :-

1) The OSWORD call to interface with AFM has been incorporated. I've allowed
   two options from AFM, Load and Append.

2) As part of doing 1), Alan Glover remarked to me that he would find it
   useful if I removed a 'purge keyboard buffer' call that the Editor
   makes before issuing a user-entered * command from our command screen.
   Amongst other things, this now makes it possible to assign a string like

   *BE|MM 3|M

   to a function key, and for it to work properly from within the Editor as
   well as from BASIC.

3) Our hardware-switching code which we download to &A00 now restores the
   previous contents after it's done its stuff, and no longer interferes
   with anything else.

4) As requested, *BMENU has been changed to *BUTIL. The minimum abbreviation
   for this is now *BUT. (as *BU. is interpreted by the MOS as *BUILD). The
   *HELP BE text reflects this change.

5) Having done so much testing to make sure the hardware-switching worked OK,
   we nearly forgot the reason why you invented it in the first place! Just out
   of curiosity, I loaded the 16K Editor half of the package into sideways RAM
   on my Master, and pressed Ctrl-Break to initialise it. *ROMS told me it was
   there, and *BE brought it up, with full editing capability!

   I've now fixed things so that if people rip off the code from the EPROM and
   try running it in 16K halves from sideways RAM as I did, they can still get
   the Editor command screen up, and issue all the commands (except UTILS!),
   but they won't be able to do any full-screen editing. Pressing Escape, or
   issuing commands like TOP, END, FIND, etc., will just be ignored, and they
   will remain on the command screen.

   In fact, a really persistent hacker could discover five consecutive bytes
   that could be replaced by NOP instructions to defeat the protection, but
   that part of the program is pretty well buried.

I hope that's it, since I've very nearly run out of bytes on the Editor half
of the package. Good luck with it, and let me know when and to whom you're
sending a review copy.

Merry Christmas!

Chris Gibson

Code: Select all

> readme3

Hello again Dave!

I keep on saying this, but here is the (final!) final version of the Editor.

'ROM' is the 32K ROM image, and 'ROMCOPY' is a second copy of it.

As I said to you when we last spoke, the changes in this version over the
previous one are as follows :-

1) *SPACE can now only be issued from within BASIC. If you issue it from the
   Editor command screen (or anywhere else) it now responds with the
   'Not BASIC?' message.

2) Issuing the UTILS command from the Editor command screen now goes via BASIC
   first. It now behaves exactly like our existing EXIT command, but then puts
   *BUTIL + CR into the keyboard buffer. In particular, PACK now works OK even
   on long programs.

Hopefully that's it! I'll book my holiday in the Bahamas once the money starts
rolling in.

Bye for now.

Regards,

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Tue Jun 02, 2015 6:09 pm

I've actually been using the ABE, under BeebEm3 (there are a few key-mapping issues!) on my Mac, to develop the MGC Menu program. It's been good to use, however, there could be a few improvements:

(1) When using the Utilities you lose the Mode that is set for the Editor.
(2) Even though I'm using it in Master Mode, on BeebEm3, the main screen isn't in Mode 7. See #3. I know it's possible to identify the machine you're running in - So, the best screen mode, for host, should be used. Although, it was converted for the Electron . . . I wonder if Mode 6 was hard-wired :?
(3) When listing a search string the 'string' is separated from the adjacent text and is difficult to locate. It would be better if the 'string' were highlighted. In colour, preferably or reverse text. Hence Mode 7 for the main screen!
(4) During a Pack, in Utils, there's no option for removing isolated or multiple colons (:)

There are possibly a few more improvements that could be made. When originally converted, for the Electron and single ROM, there was no requirement, of Chris Gibson, to make any changes to the main code. So we probably didn't even consider any improvements - time was the major factor!

Any body like to have-a-go? the source is in one of the above posts :wink:

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

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Thu Aug 20, 2015 3:39 pm

As mentioned in my last post, above, I've been using the ABE to write the MGC Menu. During that exercise I've listed some, what I think are, useful improvements:

Code: Select all

Basic editor improvements					
					
1	Remember MODE when returning from UTILS or use same MODE as BE for UTILS (preferred)				
2	When loading a file, display file name after Program size				
3	If file name not known, e.g. when entering from BASIC - read file name from first line of code. Must conform to: REM > filename 				
4	In UTILS, when packing, : (colon) and blank lines to be removed				
5	In UTILS, when packing, remove REMs in assembler code e.g. all after a ; (semi colon) <- as an offer?				
6	In UTILS, when listing search results, highlight searched string - in colour or reversed text				
7	When EDITING, allow jumps, to follow: procedures, functions etc. with special key presses e.g. with the cursor on a procedure call pressing keys x & y would move cursor to that procedure definition etc.				
8	In UTILS, when searching, allow quotations to distinguish between: e.g. ENTRIES% and NENTRIES%				
9	Maybe a Bug! Using Pack, in the UTILLS, I've had 'LANGUAGES' and 'UTILITIES' treated as variables e.g. they were shortened! Even though they were in a DATA statement. Changed to 'Utilities' was OK! 				
10	Key mapping . . . Alterable for use with an Emulator??				
I don't know if there's even room in the ROM for any changes?

Dave H :D
Last edited by daveejhitchins on Fri Aug 21, 2015 7:39 am, edited 1 time in total.
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ARA III, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
jgharston
Posts: 3576
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by jgharston » Thu Aug 20, 2015 3:43 pm

daveejhitchins wrote:

Code: Select all

Basic editor improvements
...
3	If file name not known, e.g. when entering from BASIC - read file name from first line of code. Must conform to: !*filename*! Or similar . . 
REM > filename is the standard.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

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

Re: P.R.E.S. Advanced BASIC Editor - ROM and Cartridge

Post by daveejhitchins » Fri Aug 21, 2015 9:19 am

jgharston wrote:REM > filename is the standard.
Thanks, Jonathan, updated.

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

Post Reply