Mega Games Cartridge for the Electron MGC

reminisce about bbc micro & electron games like chuckie egg, repton, elite & exile

Related forum: adventures


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

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Mon Mar 30, 2015 7:05 am

Thanks, Dave.

OK, so if I go back to what I started ages ago, and find games that will fit into 16K, that's of some help? I was working on the MicroPower catalogue. For the ones that are just over 16K I can see what can be trimmed.

Presumably we are after the better quality games that people might want to put on a cart?

I don't know about ROM FS and 32K carts, but sure someone else does!

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Mon Mar 30, 2015 7:12 am

davidb wrote:I rediscovered the collection of ROMs at the NVG FTP site via Retro-kit's archive of The BBC Lives! Unfortunately, I think we're dealing with BBC ROMs only on that site.
I could open a window, showing the directories, however, as a Guest, I couldn't drill-down to see the contents!
davidb wrote:Did you try the ROMs from Jungle Journey, available from the Downloads section of the home page? I know that dual-ROM games might be tricky to deal with, but it may be worth trying.
I have that now, thanks =D>
davidb wrote:I can also send you a work-in-progress Castle Raider ROM image if you want. It only needs one ROM slot, so shouldn't cause any problems.
Yes please :D

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
daveejhitchins
Posts: 3692
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Mon Mar 30, 2015 7:14 am

Thanks, Richard . . . anything you can do will help =D>

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
daveejhitchins
Posts: 3692
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Mon Mar 30, 2015 7:20 am

CMcDougall wrote:*cough*
viewtopic.php?f=1&t=8246&start=30#p97677
but these are mine as a kid, so only in ROM FS 8)
Thanks Col . . . Found them :oops:
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
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Mon Mar 30, 2015 7:38 am

And :oops: from me, too, cos I went back to the start of the thread, and lots of answers there to my question(s), too.

Anyway, I'll go do some more "research" :roll: with Electron Micropower titles ...

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

Re: Mega Games Cartridge for the Electron and Master

Postby davidb » Mon Mar 30, 2015 11:22 am

daveejhitchins wrote:
davidb wrote:I rediscovered the collection of ROMs at the NVG FTP site via Retro-kit's archive of The BBC Lives! Unfortunately, I think we're dealing with BBC ROMs only on that site.
I could open a window, showing the directories, however, as a Guest, I couldn't drill-down to see the contents!

Strange! Not even in Firefox? Well, you're not missing much, I suppose! :D

As for the 32K ROMFS question, I'm not sure if it's possible to split a filing system over two 16K ROMs. It seems to me that one ROM will claim the *ROM request so it won't be possible for others to get a chance to respond. ROM experts, please feel free to correct me here! :)

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Mon Mar 30, 2015 12:23 pm

davidb wrote:As for the 32K ROMFS question, I'm not sure if it's possible to split a filing system over two 16K ROMs. It seems to me that one ROM will claim the *ROM request so it won't be possible for others to get a chance to respond. ROM experts, please feel free to correct me here! :)
Ah! you may have missed the point? (sorry if you haven't). Some of the AcornSoft cartridges are 32K. The ROM FS still loads them! So, It could be that if the length of the file, as indicated by the file parameters, means it extends beyond the 16K boundary the ROMFS 'knows' to continue from the next 16K bank. If this is the case [-o< then it opens up easier use of 32K games. The only alternative is that the game that is longer than 16K loads a 'loader' for the extended file.

Examples of 32K cartridge games are:
Countdown To Doom
Starship Command
Tree of Knowledge

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
davidb
Posts: 1901
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Mega Games Cartridge for the Electron and Master

Postby davidb » Mon Mar 30, 2015 12:44 pm

I looked at Snapper last night, comparing the code to that in the Electron Advanced User Guide. The EAUG just implements service calls to select ROMFS and return data but Snapper also implements a language service call to "boot" into the loading process. It may be the case that the double ROM cartridges use that mechanism to switch ROMs during loading. I'll look again this evening.

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Mon Mar 30, 2015 4:22 pm

Thanks, David . . . Just in case you don't have any of the 'double' ROMs to hand(?) here are the three I mentioned above.

Dave H :D

Archive.zip
(44.47 KiB) Downloaded 51 times
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
sweh
Posts: 1847
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Mega Games Cartridge for the Electron and Master

Postby sweh » Mon Mar 30, 2015 4:44 pm

davidb wrote:As for the 32K ROMFS question, I'm not sure if it's possible to split a filing system over two 16K ROMs. It seems to me that one ROM will claim the *ROM request so it won't be possible for others to get a chance to respond. ROM experts, please feel free to correct me here! :)

Multiple ROMs can respond to RFS; the OS passes the call on to each one as necessary. See section 15.4 and section 16.11 of the BBC Advanced User Guide for details. It's possible for data to cross ROMs, so you could have one large file up to (just under) 32K. Each ROM needs to implement the minimal service routine shown in 15.4
Rgds
Stephen

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

Re: Mega Games Cartridge for the Electron and Master

Postby CMcDougall » Mon Mar 30, 2015 8:56 pm

daveejhitchins wrote: length of the file, as indicated by the file parameters, means it extends beyond the 16K boundary the ROMFS 'knows' to continue from the next 16K bank. If this is the case [-o< then it opens up easier use of 32K games. The only alternative is that the game that is longer than 16K loads a 'loader' for the extended file

the 32k ones you pointed to Dave are just split into 2 x 16k, so with the files in order it will load quite quick:
starSr 2roms.png

^if you get them loaded round right way... :lol:
so as you can see, the extra line between STRCOM2 & 'header' *Star01* is just one file ending and jumping to next rom to get the rest (not a big file split across the two).

I did put up some proggys a while back from BeeBug mags /discs, that will make the ones I did as a kid, also one that will just run it without RFS, like Mark@RCs Chuckie/ Snapper /MissileControl (instant run, much quicker).

will link up when I find again.....
old post from 2006:
Prommer by TMU'87
Can put more progs on, and loads fast as lightning.

RomGen by Beebug Nov'87
This puts progs into RFS.

but linky is dead, so will upload in a mo....
ImageImageImage

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Mon Mar 30, 2015 9:22 pm

Thanks, Col . . . Appreciated. Here is the extract form the ABR User Guide about its Utility MakeROM:

Code: Select all

MakeROM

This program is used to frame one or more files in a Rom Filing System image, for loading from a RAM bank (like the way these utilities were supplied).

The Rom Filing System is activated by *ROM, and behaves like the Tape system, except that only reading is permitted.

This program is a Sideways RAM image, and must be loaded into a RAM bank using *LoadROM.

Start the program with *MakeROM or *PMakeROM. Either form of the name may be abbreviated by putting a full stop after the characters.

The program can only be run in the host processor, so Second Processor users should run this program with the Tube off. If a Tube is active the program will refuse to respond to *MakeROM/*PMakeROM.

Once the program has been started it will ask you for a title for the image about to be created. This name will appear on *ROMS as the title of the ROM, and will also appear on *HELP. It can be up to 20 characters long, and should only include alphanumeric characters.

You will then be presented with a list of options to choose from, which are:

   T   Select Tape and then load a file
   D   Select DFS and then load a file
   A   Select ADFS and then load a file
   R   Load a file from current filing system
   *   Operating system command
   F   Start a fresh image
   S   Save the current image
   Q   Quit the program


Options T, D and A will select the relevant filing system, and then ask for a filename. (R just asks for the name, keeping the current filing system). The filename must be just a filename, of one to ten characters. It cannot include any kind of directory specification or other special characters.

****************************************************************************************
The file will then be read and converted into ROM filing system format. An error message will be displayed if the file would cause the image to overflow, and the file will not be included.
****************************************************************************************

Once the conversion has been completed or aborted the option list will be displayed again.

* is provided for Operating System commands to be entered. Care should be taken that memory is not corrupted, otherwise the image being built may be overwritten. When the OS command has completed, press the RETURN key and the option list will be displayed again.

F starts the program again with an empty image. The program will ask you to confirm that you want to start afresh by pressing Y. Press ESCAPE if you have second thoughts.

S saves the image to the current filing system. You will be asked for a filename.

Q leaves the program. You will be asked to confirm that you want to leave by pressing Y, or ESCAPE if you have had second thoughts. When you leave MakeROM you will be returned to BASIC.

The image produced by this program may be loaded into a RAM bank by using *LoadROM.

Normally files in a ROM filing system image cannot be executed with *name but must be run with */name or *RUN name. Images produced by this program will permit programs to be run by *name.

It is possible to have a !Boot file in an image which can be started by SHIFT SPACE BREAK. However, this program must be in machine code, and is called before BASIC is started. To make the facility more useful, a program called !Boot is included in the ABR. This program starts up BASIC and then CHAINs a program called BOOT. Thus to set up an auto-boot sequence you should include the !Boot provided and a BASIC program BOOT of your own.
I 'sectioned' the area that shows it will only load a 16K block - But that's OK. From what Col says the Boot file will just call, say, for example, *load1 then *load2 followed by a jump to initiate the code!!

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
jgharston
Posts: 2764
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Mega Games Cartridge for the Electron and Master

Postby jgharston » Mon Mar 30, 2015 9:37 pm

daveejhitchins wrote:Thanks, Col . . . Appreciated. Here is the extract form the ABR User Guide about its Utility MakeROM:
There's also a version of Acorn User's ROMFiler on mdfs.net.

Code: Select all

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

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

Re: Mega Games Cartridge for the Electron and Master

Postby davidb » Mon Mar 30, 2015 9:47 pm

Here you go, DaveH! :D

I've written a script to convert UEF files to ROM images as well, but it's not really ready yet. Some games work, like Magic Mushrooms and Killer Gorilla. Others, such as Escape From Moonbase Alpha, sort of work but exhibit weird screen-corrupting behaviour. The rest will need some tweaking to work from ROM, and many will need to be split across ROMs. Deathstar, for example, will run if you just skip the standard Superior loading screen, so the bootloader in the ROM could just run the next file after that. :)

I can't believe how long it takes many of them to load! :(
Attachments
CastleRaider-1.0.3-prerelease-DaveH.zip
Castle Raider Electron ROM cartridge pre-release.
(22.11 KiB) Downloaded 43 times

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

Re: Mega Games Cartridge for the Electron and Master

Postby CMcDougall » Mon Mar 30, 2015 10:00 pm

me wrote:so will upload in a mo....

found them :mrgreen:

Rom Generator vB4.9G -Mark Lock -BeeBug Nov'87 (get files onto RFS)

Prommer v1.0 -Hugh Haskell -The Micro User 1987 (*FILE instant load, not RFS)
Attachments
tapeORdisc to ROMs.zip
SSD
(8.73 KiB) Downloaded 55 times
ImageImageImage

dangardner
Posts: 161
Joined: Sun Apr 01, 2012 12:30 pm
Location: The Wicklow Mountains

Re: Mega Games Cartridge for the Electron and Master

Postby dangardner » Mon Mar 30, 2015 10:02 pm

Here's a ROM version of Zalaga that I found, it can be run with *ZALAGA. It needs to have PAGE=&E00 if I remember correctly.
Attachments
ZALAGA.zip
(9.9 KiB) Downloaded 56 times

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Tue Mar 31, 2015 7:58 am

Thanks to everyone above =D> - Looks like we're making progress :D

I'll use what I currently have, or will have by the time I'm ready to program the next EEPROM, for the Wakefield MGC. Next will be the Testing to make sure everything works that I'm going to program. Easter . . . May get some time then :^o

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
davidb
Posts: 1901
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Mega Games Cartridge for the Electron and Master

Postby davidb » Thu Apr 02, 2015 3:16 pm

Interested parties can get my Python script from this Mercurial repository. It also requires the Ophis assembler to be installed, so I imagine that the number of users is going to be limited by those requirements. The script only creates single ROM images and doesn't really care how large they are, so clearly any it generates over 16K won't work, and the rest aren't guaranteed to work due to *TAPE calls in loaders and other things that would need to be patched.

I'm busy with other things at the moment but might return to it in a few days.

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Thu Apr 23, 2015 8:29 pm

I have a - sort of - working MGC :D :D

Managed to build it this evening . . . Plugged it into my Elk. turned on with shift held down . . . Menu downloaded perfectly - and it read the index OK

Tried the first game: Hopper : worked a treat. Second game: Snapper - Hmmm! I think the menu's OK so maybe I've put something in the wrong place <- to check. Count Down To Doom loaded the first ROM then failed to find the second one - could be mixed-up with Snapper :oops: Tree Of Knowledge loaded OK - StarMon and ElkMon work OK, as did Lisp. I have ADT and ADI - or so I thought - seem to have loaded AID - dyslexic or what :oops: ADT was OK though.

Anyway, in general I'm pleased. The menu will work 'outside' the ROM so I can continue development - I'll take all the advice I can get, at Wakefield. It definitely needs an assembler routine to load the details from the ROM - bit slow at the moment.

At this rate I'll have a dozen working with various ROM content - maybe I'll get it right in the end :lol:

Dave H :D

p.s. I'll try and do a video tomorrow, for those not at Wakefield.
p.p.s. There will be a program to load your own games, eventually :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
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Thu Apr 23, 2015 9:12 pm

Hi, Dave, sounds good. =D>

I've been working on my GoSDC (as per other thread) to get titles onto my Electron so I can start MakeROMing them (have finally understood that - worked it out before and then forgot!)

So I'll see what Micropower titles I can easily get into 16K ROM images and post them here, so when the hardware is ready, hopefully I'll have some titles for you to try.

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Thu Apr 23, 2015 10:16 pm

I'm certain the hardware is ready . . . Just have to load the images into a 4MB HEX file, on my Mac, then program the ROM before mounting on the board - on my third iteration with a fourth in the pipeline. I've been developing the Menu program on BeebEm3 (great program :D ) in SWRAM. The program doesn't assume it's in a particular ROM number but does assume it's in a Cartridge slot. So the Menu will fully work from SWRAM - makes testing so much easier. Just need to speed-up the 'fetching' from the ROM image - currently using the OS to Read Bytes one at a time!

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
daveejhitchins
Posts: 3692
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Fri Apr 24, 2015 9:11 pm

Ah! Found the problem . . . One small error in the Menu program that was stopping Snapper from running.

I've also found why I had the other problems. I fixed the problems that I'd seen, reprogrammed and rebuilt. Still discovered two more issues?? Had a good look at what I was doing and and how. I'm using HexEdit, on my Mac - I thought I was pasting into my required areas. However, it turns out that the paste function doesn't overtype, it inserts! So it was moving everything up, out of place. You have to highlight the area you wish to paste into - then it overtypes.

The MGC will Debut at Wakefield, tomorrow. The games, Utilities and Languages all work as planned. The Menu does need some work :roll:

The MGC loads a compressed version of the BASIC Menu program, however, the uncompressed version is also loaded and available via the the ROMFS.

Hardware works fine . . . on the Electron . . . I have a problem on the Master, however!! It works OK for a few minutes - then hangs the machine. I've eliminated the latches causing the problem, so I'll have to work through the PLD and try various options.

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
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Sat Apr 25, 2015 9:38 pm

daveejhitchins wrote:MGC - Hmmm! Need to work on the Displaying of the titles, how the titles are loaded and how they are run . . . not a lot to do then :?
Anything anyone else can help with (including myself, depending on what is needed), or a bit too difficult without the hardware or just easiest to do yourself?

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Sat Apr 25, 2015 10:34 pm

richardtoohey wrote:Anything anyone else can help with (including myself, depending on what is needed), or a bit too difficult without the hardware or just easiest to do yourself?
Richard: Thanks. I've attached the BASIC program. See if you can make sense of it. Not sure if if I've documented it well enough. I've also added a description of the MGC and a spread sheet that provides further information.

Currently the software has to know which machine it's in and which cartridge slot. Then, to list the titles, it has to look at each entry, in turn, check the machine compatibility, and type of entry (game, utility, language) - if not compatible, then skip and move to the next entry. Once it's found a valid entry it stores the entry #, in an array, for later, then gets one byte at a time, using the OS Read ROM call, and prints to the screen.

Once the screen is full, or has run out of entries, it asks for a selection. Once made, details of where the selection is located is pulled from the array, and the Page Latch and Control Latch contents are recovered/calculated. These are then used to set the ROM up ready for launch.

Currently I just "call !-4" , however, it seems that this is unsatisfactory What I need to do is add the ROM into the ROM table - select the ROMFS and *RUN the !BOOT file. But, even that's not good enough, as the loading speed, of the ROMFS, is just too slow. A general or specific machine code loader is required to 'pull' the game off the ROM (not needed for Languages of Utilities). This loader, needs to run from the ROM!.

A second piece of machine code is needed to do the search and print-to-screen routine.

Not a small task! But I'm sure I can do this . . . Just a time thing. There again helpful suggestions are always welcome.

Dave H :D

MGC Info Pack.zip
(147.81 KiB) Downloaded 57 times
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
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Sat Apr 25, 2015 11:56 pm

Thanks, Dave.

No promises, but if I can help with a routine here or there, I will.

But first thing is to look at what is there and get my head around it.

The menu system might be similar to Dave (hoglet's) menu for AtomMMC - the storage, selection, navigation etc. Then the launching of titles is a bit different.

Anyway, as they say on various parts of the 'net - time for me to shut up and hack!

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

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Sun Apr 26, 2015 2:27 am

OK, Dave, I've had a look and the theory is (mostly) clear, and the code is, too.

At Power-UP … system will see 2 x 16K block in one cartridge slot. This mode is to ensure that the Menu Program will be Auto Booted and loaded and have available the ‘catalogue’ in the second 16K block.

So the menu can't be in BASIC, because it needs to come off the ROM (first bank), is that correct? So it will be 6502 code that is run on command *MGC (or whatever), and then it needs to read the catalogue in the second bank ... and then I get a bit stuck - more from my lack of knowledge of how ROMs work, I suspect.

If the menu is changed into m/c, when PROCslot checks slot 0 or 2 for the catalogue's &17 marker, how will it see that marker if the menu bank is switched in (the catalogue will be in the other 16K bank, so 1 or 3?)

And I don't understand this bit:
daveejhitchins wrote:Currently I just "call !-4" , however, it seems that this is unsatisfactory What I need to do is add the ROM into the ROM table - select the ROMFS and *RUN the !BOOT file. But, even that's not good enough, as the loading speed, of the ROMFS, is just too slow. A general or specific machine code loader is required to 'pull' the game off the ROM (not needed for Languages of Utilities). This loader, needs to run from the ROM!.
So your current code selects the correct ROM image out of the 256 banks available, "presses Break" (CALL!-4) and that should cause the ROM to auto-boot. That makes sense.

By ROM table, you mean &F4 and &FE30 or something else (*ROMFS)?

If the loading speed of ROMFS is too slow, how can you make it faster to "pull" the game off the ROM? Pull it to where? If I've got a game that is, say, !BOOT that loads LOADER (BASIC program that does ENVELOPEs, VDU23, sets screen mode, shows instructions, etc. and *LOADS PIC1, then does *RUN GAME) Where can those 4 files be pulled to?

I've got a question about the dedicated loaders, but let's get these lot out the way first - that might answer the loader question.

If my questions are making you go :roll: [-( ](*,) just say so and I'll leave you to it, no (more) questions asked. :D

[EDIT: on a side note, the whole ROM filing system is very well explained in the New Advanced User Guide and the Electron Advanced User Guide ... not sure how I managed to miss all that when asking questions in the past!]

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

Re: Mega Games Cartridge for the Electron and Master

Postby jgharston » Sun Apr 26, 2015 8:42 am

richardtoohey wrote:By ROM table, you mean &F4 and &FE30 or something else (*ROMFS)?
The ROM table is the table at &2A1-&2B0 (&2A0-&2AF on the Electron) that is a table of the ROM type bytes of each ROM so the operating system knows if there's a ROM in that slot. It is initialised at Break (Ctrl-Break on the Master). Some versions of *SRLOAD have a I parameter that "inserts" the ROM into the ROM table after loading so that it can be seen.

Code: Select all

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

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Sun Apr 26, 2015 8:55 am

richardtoohey wrote:OK, Dave, I've had a look and the theory is (mostly) clear, and the code is, too.
Oh good! I think I can make some improvements to the comments. Did you find the Variable List in the Spreadsheet?
richardtoohey wrote:At Power-UP … system will see 2 x 16K block in one cartridge slot. This mode is to ensure that the Menu Program will be Auto Booted and loaded and have available the ‘catalogue’ in the second 16K block.
Correct.
richardtoohey wrote:So the menu can't be in BASIC, because it needs to come off the ROM (first bank), is that correct?
Yes it can! As it's loaded within the ROMFS! e.g. it's just another Filing System . . .
richardtoohey wrote:If the menu is changed into m/c, when PROCslot checks slot 0 or 2 for the catalogue's &17 marker, how will it see that marker if the menu bank is switched in (the catalogue will be in the other 16K bank, so 1 or 3?)
OK . . . We don't know where we are, other than in a cartridge slot in an Electron or Master. So we take a peek at &8000, looking for &17 (could be changed to any arbitrary number-it's just something to identify where we are) in ROM position 0 and 2 (The Menu will always be in 1 or 3) - Remember, we're in the two 16K bank mode, at this point!
richardtoohey wrote:And I don't understand this bit:
daveejhitchins wrote:Currently I just "call !-4" , however, it seems that this is unsatisfactory What I need to do is add the ROM into the ROM table - select the ROMFS and *RUN the !BOOT file. But, even that's not good enough, as the loading speed, of the ROMFS, is just too slow. A general or specific machine code loader is required to 'pull' the game off the ROM (not needed for Languages of Utilities). This loader, needs to run from the ROM!.
So your current code selects the correct ROM image out of the 256 banks available, "presses Break" (CALL!-4) and that should cause the ROM to auto-boot. That makes sense.
Currently I'm assuming that when I 'CALL !-4' the system will reset similar to a CTRL SHIFT BREAK - It seems that this is not reliable - or more likely I don't understand that function! I've had it working on some games and not others. It may be that the 'load' option (in the game's !BOOTs file header) isn't 'set' correctly! I'll look-up where that byte is and check. However, it could be for some other reason. I think I know why the ROMFS loading is so slow! I'm using the same mechanism for reading the title from the index table - you can only do it one byte at a time :shock: . Talking to Mark (RetroClinic), at the Wakefield Show, He's written a machine Code Loader for the Instant Loading ROMs he has available. Maybe he'll share that bit of code [-o< This could be used in place of the ROMFS to give us the same Instant Loading.
richardtoohey wrote:By ROM table, you mean &F4 and &FE30 or something else (*ROMFS)?
It's the table mentioned above where the OS stores what ROM are present - as an example: When a Utility, like ARM (Advanced ROM Manager) *RLOADs a ROM image - you don't need to do a CTRL BRK to 'see' the ROM (using a *ROMS) as ARM has Filled-In in presence where the OS stores the ROM Table (I'm probably using the wrong names to describe some OS things here!)

Hope I've covered everything?

Dave H :D

p.s. Just noted that Jonathan has explained the ROM table for me =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
richardtoohey
Posts: 3378
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand

Re: Mega Games Cartridge for the Electron and Master

Postby richardtoohey » Sun Apr 26, 2015 9:18 am

daveejhitchins wrote:Did you find the Variable List in the Spreadsheet?
Yes, it was very useful. :D

OK, menu can be BASIC, because our bank is ROMFS format, so something like *MakeROM puts it there for us.
daveejhitchins wrote:So we take a peek at &8000, looking for &17 (could be changed to any arbitrary number-it's just something to identify where we are) in ROM position 0 and 2 (The Menu will always be in 1 or 3) - Remember, we're in the two 16K bank mode, at this point!
Yes, I got the 2 banks, but wasn't exactly sure of the bank numbers or how it would work, but I see now.
daveejhitchins wrote:Currently I'm assuming that when I 'CALL !-4' the system will reset similar to a CTRL SHIFT BREAK - It seems that this is not reliable - or more likely I don't understand that function! I've had it working on some games and not others. It may be that the 'load' option (in the game's !BOOTs file header) isn't 'set' correctly! I'll look-up where that byte is and check. However, it could be for some other reason. I think I know why the ROMFS loading is so slow! I'm using the same mechanism for reading the title from the index table - you can only do it one byte at a time :shock: . Talking to Mark (RetroClinic), at the Wakefield Show, He's written a machine Code Loader for the Instant Loading ROMs he has available. Maybe he'll share that bit of code [-o< This could be used in place of the ROMFS to give us the same Instant Loading.
Wonder if his games are ROMFS or the core game binary moved to ROM - so the code runs directly from ROM? :-k

e.g. with Chuckie Egg there's a BASIC program CHUCKIE that defines the characters, goes into MODE 4, *LOADS the next part CH_EGG and calls into that.

You could convert the BASIC into machine code and merge into the main CH_EGG program, or have a loader at &80XX that sets things up and then calls the main game at &8100 (or whatever.)
daveejhitchins wrote:It's the table mentioned above where the OS stores what ROM are present - as an example: When a Utility, like ARM (Advanced ROM Manager) *RLOADs a ROM image - you don't need to do a CTRL BRK to 'see' the ROM (using a *ROMS) as ARM has Filled-In in presence where the OS stores the ROM Table (I'm probably using the wrong names to describe some OS things here!)
Yes, as JGH has described - so (brief version) the ROM Type is bits 0-3 processor language (e.g. 6502 BASIC or 68000 or Z80), bit 4 Electron firm key expansions, bit 5 ROM has relocation address, bit 6 indicates language ROM, bit 7 indicates ROM has service entry (EAUG pp. 145). So the theory is that you set the byte correctly in the ROM table, and then you don't need the CALL!-4 - the ROM will be there, so you can move straight onto the *EXEC !BOOT or CHAIN "!BOOT" or the dedicated loader.

EDIT - meant to say, I've got an Electron set up with ROMs and SWRAM etc. so I can have a good play on real hardware now - and I can answer some of my own questions.

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

Re: Mega Games Cartridge for the Electron and Master

Postby daveejhitchins » Sun Apr 26, 2015 1:33 pm

richardtoohey wrote:OK, menu can be BASIC, because our bank is ROMFS format, so something like *MakeROM puts it there for us.
I'm just using MakeROM for the Menu, currently, but may even try and get that turbo charged with a loader . . .
richardtoohey wrote:Wonder if his games are ROMFS or the core game binary moved to ROM - so the code runs directly from ROM? :-k

e.g. with Chuckie Egg there's a BASIC program CHUCKIE that defines the characters, goes into MODE 4, *LOADS the next part CH_EGG and calls into that.
Mark did explain what he does . . . But that was yesterday :? Hopefully, he'll read this and tell us/or not how he does it!
richardtoohey wrote:Yes, as JGH has described - so (brief version) the ROM Type is bits 0-3 processor language (e.g. 6502 BASIC or 68000 or Z80), bit 4 Electron firm key expansions, bit 5 ROM has relocation address, bit 6 indicates language ROM, bit 7 indicates ROM has service entry (EAUG pp. 145). So the theory is that you set the byte correctly in the ROM table, and then you don't need the CALL!-4 - the ROM will be there, so you can move straight onto the *EXEC !BOOT or CHAIN "!BOOT" or the dedicated loader.
The dedicated loader, I think, will be the best way forward (?)

As I mentioned, I'm using BeebEm3 for the Menu development - but can't load the 4mb ROM :shock:

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


Return to “software: classic games”

Who is online

Users browsing this forum: No registered users and 4 guests