MGC MK II Menu Development using BeebEm on Mac : Run out of space

discussion of beeb/electron applications, languages, utils and educational s/w
Post Reply
User avatar
daveejhitchins
Posts: 5000
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by daveejhitchins » Fri May 10, 2019 7:53 am

As the title suggests: I'm developing the MGC MK II Menu on my MacBook using BeebEm4 (Master Mode) and I've run out of room due to the amount of REM text!

I considered using a 2nd CoPro, however, I'm using my BASIC Editor that doesn't work over the Tube :?

Are there any solutions I can use "easily" to continue on my laptop?

Thanks . . . 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
Elminster
Posts: 3690
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by Elminster » Fri May 10, 2019 8:22 am

When I ran out of space for Basic Editor, I just carried on writing it on Mac and copying it across, when I ran out of space again I started using the crunch and compress, when I ran out of space again I used the co pro..... not sure what I will do when I run out of space again.

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

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by hoglet » Fri May 10, 2019 8:37 am

daveejhitchins wrote:
Fri May 10, 2019 7:53 am
As the title suggests: I'm developing the MGC MK II Menu on my MacBook using BeebEm4 (Master Mode) and I've run out of room due to the amount of REM text!
Is it already using the shadow screen memory?

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

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by lurkio » Fri May 10, 2019 8:42 am

daveejhitchins wrote:
Fri May 10, 2019 7:53 am
I'm developing the MGC MK II Menu on my MacBook using BeebEm4 (Master Mode) and I've run out of room due to the amount of REM text! I considered using a 2nd CoPro, however, I'm using my BASIC Editor that doesn't work over the Tube :? Are there any solutions I can use "easily" to continue on my laptop?
Use a text editor (like TextWrangler or BBEdit) on your Mac to edit the BASIC program, and copy and paste the whole of the listing into BeebEm whenever you want to run it and test it.

To avoid having the REMs take up space in RAM when you paste the listing from the text editor into BeebEm, remove the line number of the line that each REM is on, so that the REMs still appear interleaved in the right places in the text file on your Mac but they’re not actually part of the program per se. This will only work if (a) you’re using line numbers for non-REM lines in the text file and (b) whenever you use a REM it appears at the beginning of the line rather than being appended to a BASIC statement with a colon.

E.g. here’s the sort of thing that would appear in the text editor on your Mac:

Code: Select all

REM start of program
REM begin loop 
10 REPEAT
REM print text
20 PRINT "Look, ma! No REMs!"
REM loop never ends
30 UNTIL FALSE
REM program ends

Dunno if this approach is compatible with the BASIC editor on the emulated Beeb though. Do you need the BASIC editor on the Beeb any more if you’re going to switch to text-editing on the Mac?

:?:
Last edited by lurkio on Fri May 10, 2019 9:56 am, edited 3 times in total.

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

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by daveejhitchins » Fri May 10, 2019 9:16 am

hoglet wrote:
Fri May 10, 2019 8:37 am
Is it already using the shadow screen memory?
Yes, I started right at the beginning (original MGC) with shadow memory.
lurkio wrote:
Fri May 10, 2019 8:42 am
Use a text editor (like TextWrangler or BBEdit) on your Mac to edit the BASIC program, and copy and paste the whole of the listing into BeebEm whenever you want to run it and test it.
Ah! I didn't know you could 'paste' into BeebEm. That may be an option - Thanks.
lurkio wrote:
Fri May 10, 2019 8:42 am
To avoid having the REMs take up space in RAM when you paste the listing from the text editor into BeebEm, remove the line number of the line that each REM is on, so that the REMs still appear interleaved in the right places in the text file on your Mac but they’re not actually part of the program per se. This will only work if (a) you’re using line numbers for non-REM lines in the text file and (b) whenever you use a REM it appears at the beginning of the line rather than being appended to a BASIC statement with a colon.
But wouldn't I still have the same number of characters?

Another idea I've thought of is to save out individual Procedures. Then I could squash each one before rebuilding and running.

Which ever way I try, it's going to take longer :?

Thanks for the advice . . . I'll let you know how I get on.

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
lurkio
Posts: 2147
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by lurkio » Fri May 10, 2019 9:46 am

daveejhitchins wrote:
Fri May 10, 2019 9:16 am
lurkio wrote:
Fri May 10, 2019 8:42 am
To avoid having the REMs take up space in RAM when you paste the listing from the text editor into BeebEm, remove the line number of the line that each REM is on, so that the REMs still appear interleaved in the right places in the text file on your Mac but they’re not actually part of the program per se. This will only work if (a) you’re using line numbers for non-REM lines in the text file and (b) whenever you use a REM it appears at the beginning of the line rather than being appended to a BASIC statement with a colon.
But wouldn't I still have the same number of characters?
No. Copy and paste the text (including REMs) in the Code panel in my previous post (above) into BeebEm. Then LIST the program in BeebEm... No REMs!

:idea:
Last edited by lurkio on Fri May 10, 2019 9:57 am, edited 2 times in total.

LordVaderUK
Posts: 63
Joined: Thu Jan 31, 2019 12:26 am
Contact:

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by LordVaderUK » Fri May 10, 2019 10:45 am

That's a nice idea (not numbering the REMs)... I am having a problem with a fairly simple and straightforward Blackjack game, works a treat in BBC Basic / SDLIDE but won't fit on BeebEm (and presumably a real Beeb). Unfortunately SDLIDE can either number everything, or only number 'necessary' lines, which in practice means it will number DATA statements.

I've done the best I can - offloaded all the instructions into a file which is loaded and displayed if needed, cut down on the number of PROCs, changed all the variables to integers, drastically reduced the number of arrays, etc. but it's still too big. Any other suggestions?

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

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by Elminster » Fri May 10, 2019 11:29 am

lurkio wrote:
Fri May 10, 2019 8:42 am
daveejhitchins wrote:
Fri May 10, 2019 7:53 am
I'm developing the MGC MK II Menu on my MacBook using BeebEm4 (Master Mode) and I've run out of room due to the amount of REM text! I considered using a 2nd CoPro, however, I'm using my BASIC Editor that doesn't work over the Tube :? Are there any solutions I can use "easily" to continue on my laptop?
Use a text editor (like TextWrangler or BBEdit) on your Mac to edit the BASIC program, and copy and paste the whole of the listing into BeebEm whenever you want to run it and test it.
And I posted a BBC Basic BBEdit Language Post around here somewhere, so BBEDIT will highlight BBBC BASIC properly.

Edit: Here viewtopic.php?f=7&t=3953&hilit=bbedit#p110804

Edit2: Then I remembered I put them all on github https://github.com/elminster/BBEdit-LMs
Last edited by Elminster on Fri May 10, 2019 11:33 am, edited 2 times in total.

User avatar
tricky
Posts: 3592
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by tricky » Fri May 10, 2019 1:02 pm

BooBip does an OS "shadow RAM" board, I wonder how hard it would be to add that to beebem.

I believe using integers actually takes more memory for individual variables as their names are one character longer and the names are used many times - I could be completely wrong about this!

Could you put the DATA in a file, or have one program to load it into memory and then load the main program that uses it?

Does P. take less space than PRINT?

User avatar
Richard Russell
Posts: 877
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by Richard Russell » Fri May 10, 2019 2:23 pm

LordVaderUK wrote:
Fri May 10, 2019 10:45 am
Unfortunately SDLIDE can either number everything, or only number 'necessary' lines, which in practice means it will number DATA statements.
SDLIDE should only number DATA statements if they are referenced in a RESTORE (and hence the numbers are 'necesssary'). Numbering all lines except REMs is not an option it has (!) but since it's written in BBC BASIC you could quite easily add it, or modify the existing renumber code to work that way. Look at how the 'remove%' flag is used in PROCrenumber for guidance.

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

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by MartinB » Fri May 10, 2019 2:39 pm

Use a smaller font Dave....? :-k

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

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by daveejhitchins » Fri May 10, 2019 3:31 pm

MartinB wrote:
Fri May 10, 2019 2:39 pm
Use a smaller font Dave....? :-k
:lol:

If only . . .

Dave H :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: 5000
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: MGC MK II Menu Development using BeebEm on Mac : Run out of space

Post by daveejhitchins » Sat May 11, 2019 10:19 am

OK, I now have BBEDIT running so I hope to be using this in the near future.

In the meantime I've restructured and have made available a further 2175 bytes - let see how long those will last!

Thanks to all for the advice - 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