Dragon MMC and AGD games

Hardware Hacking, Programming and Game Solutions/Cheats
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Dragon MMC and AGD games

Post by pser1 »

Hello,
after a long time, I decided to upgrade my MMC module to v1.1 - It works flawlessly and reads well the big disk formats up to 720k, great!
I tried to test an AGD game, and I have not got it working.
The AGD programs need to work in MAP, so all RAM. I understand that this should not be a problem for the MMC
But these games need to use part of the DOS working area, that's why they ask you if your DOS is greater
than 8K, in which case you have to choose option 2. They use from $e000 onwards
Unfortunately the 8k DOS I am uploading to RAM is the standard DosPlus5.0 and it seems that it has no idea
about the commands to be sent to the module in order to load a file ...
Is there anyone that has used the MMC to play with any of the AGD games, FOGGY included?
Maybe there is a way to start with a shorter DOS that fits in 8K, so it will work in MAP1 ...
When choosing option 1, saying to the AGD program that my DOS is shorter than 8K fails right now :-(

Any hint - solution will be very appreciated
Thanks in advance
pere
admin
Site Admin
Posts: 409
Joined: Thu Jul 17, 2008 10:22 pm

Re: Dragon MMC and AGD games

Post by admin »

I think the MMC uses a patched version of either DragonDos or SuperDos - I can't remember which one.
Simon Hardy
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon MMC and AGD games

Post by pser1 »

Hi,
thanks for the info.
Let me talk about the CoCo-SDC to have something to compare to.
The CoCo-SDC comes by default (if you tell Ed Snider to do so) with my DosPlus5.0 extended that uses almost 15kb
so it will be not compatible with my AGD converted games either ...
But the CoCo-SDC allows me to mount a disk in a drive and then start any other ROM, for instance DDOS1.3C
Once it starts, this unpatched DDOS1.3C is able to 'see' the already mounted disk and load and exec anything from it.
So there is some kind of 'control' from the microcontroller that catches any DOS command and honores it.

All of my AGD disks for the Dragon ask the user if his DOS is greater than 8k, in which case, the program switches to MAP1
and copies the Basic and a reduced DOSPlus5.0 (not extended). That way, once the computer has restarted, you can load/run
LPM4.BAS, for instance, that in turn loads binaries and starts the game.

I thought that this trick would work well with the MMC too but it seems that I am doing something wrong, or worse, this could not
be done with the MMC because we have lost the SDcard commands (?)
This is why I asked for any hint-help to be able to play these AGD games from the MMC
cheers
pere
admin
Site Admin
Posts: 409
Joined: Thu Jul 17, 2008 10:22 pm

Re: Dragon MMC and AGD games

Post by admin »

All I can remember from conversations is that there is a lot more going on with the MMC to allow it to emulate the tape interface and rom carts - It certainly copies the basic ROM and patches it for the the tape stuff...

Going to have to wait for prime to come online and advise....
Simon Hardy
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon MMC and AGD games

Post by pser1 »

admin wrote:All I can remember from conversations is that there is a lot more going on with the MMC to allow it to emulate the tape interface and rom carts - It certainly copies the basic ROM and patches it for the the tape stuff...
Going to have to wait for prime to come online and advise....
Hi,
right, we should better wait for him to tell us about this case.
I think that the manual says that once you load a ROM and the board is re-started, you loose the code to control the MMC
This can be good for some ROMs that work without need to access DOS, but in the case of AGD games it is mandatory :-(
regards
pere
prime
Posts: 266
Joined: Fri Apr 10, 2009 1:40 am

Re: Dragon MMC and AGD games

Post by prime »

Somthing to remember when comparing CoCoSDC and DragonMMC is that IIRC CoCoSDC emulates the floppy controller hardware, DragonMMC does not.
In fact the early versions of DragonMMC had no disk support at all.

DragonMMC has the following memory map when switched on, all in map 0 :

$0000-$7FFF Normal 32K RAM.
$8000-$BFFF Normal basic ROM.
$C000-$DFFF Patched DragonDOS 1.3.
$E000-$FEFF DragonMMC code including tape emulation & code to 'talk' to the AVR.
$FFF0-$FFFF Write protected RAM with modified NMI vector to support the 'snapshot' button.

When tape emulation is turned on the Basic, Dos & MMC ROM areas are copied from the ROMS to a static RAM on the MMC board and then patched, however this is *STILL* in map type 0, even though the whole 64K is RAM.

If the SAM map type is changed then whichever setting is present above will be paged out and the normal 64K of SAM memory will be paged in (assuming it is present).

One design desision I also made was that there are 'official' entry points to DOS via the jump table at $C000, that I was only going to support those, programs shouldn't be making random jumps into the DOS ROM.

Something that may be able to be done is maybe to produce a 'cut down' DOS that abandons some of the commands to try and fit the DOS & MMC segments into the $C000-$DFFF area, but it would mean cutting out large chunks of functionality from both the MMC and the DOS emulation.

I am intending to make the design completely open source, eventually, would it help to publish (on github) the "Soft" parts of the design e.g. 6809 code, the AVR microcontroller's code (C) and the CPLD's code (Verilog).

Cheers.

Phill.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon MMC and AGD games

Post by pser1 »

Hi Phill,
thanks for answering that fast!
I didn't want to compare MMC vs SDC. Each one has features that are not present on the other ...
What I was saying is exactly what you propose in your answer ... Have a separate DOS with a reduced
command set that mostly has to be able to dir/load from the disk mounted in any drive. No need for
the commands that help manage the contents of the card.
If this could be done, then we could mount a game disk on, say drive 1, then MCARTLOADA"SMALLDOS.ROM"
and once started we could do RUN"SETAGD.BAS" and the games will work flawlessly.
Of course this implies that the loaded DOS stays alive when the program switches to MAP1 ...
Right now I am working on a great bunch of games that *must* be compiled with my AGD engine, then tested/verified
so that I can release them (as soon as possible). But there are about 135 more programs waiting in the production queue

I think it is a very good idea to put the source code on GitHub for someone could try to work with it ...
I will give it a peek in the future (no less than 5-6 months still on AGD )
cheers
pere
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon MMC and AGD games

Post by pser1 »

Hello Phill,
it seems that after 205 games already worked, the "AGD converting games" project is getting to an end.
So it could be a good time to think about a solution to make those games run from the Dragon-MMC board.

Using the CoCo-SDC with my DosPlus5.0 extended, the problem was that the D.O.S. is much greater than 8K and
the AGD games need to use from $E000 onwards. To solve that, the VDK files contain an alternate DOS under 8K
that can be used safely to load the actual executable file without issues ...

As your board has a 'special' DOS that uses some code from $E000 on to talk to the AVR, I am sure that we could
reduce some 'not needed' DOS commands and fill this area with the code made to send/receive data via AVR.
I would like to work on that 'mini-DOS' if you don't mind. Just will need the asm source code for the modified DOS
and the AVR extensions.
I asume that loading this mini-DOS to RAM and then copying it into MAP1 wouldn't be a problem, right?
kind reards
pere
prime
Posts: 266
Joined: Fri Apr 10, 2009 1:40 am

Re: Dragon MMC and AGD games

Post by prime »

pser1 wrote: Fri Jul 12, 2019 2:14 pm As your board has a 'special' DOS that uses some code from $E000 on to talk to the AVR, I am sure that we could
reduce some 'not needed' DOS commands and fill this area with the code made to send/receive data via AVR.
I would like to work on that 'mini-DOS' if you don't mind. Just will need the asm source code for the modified DOS
and the AVR extensions.
That should be possible, infact you should be able to talk direct to the AVR and issue it commands if you wanted to and as the AVR has 128K of flash which less than half is used it may also be possible to add code to that side that would make things easier for you too.
I asume that loading this mini-DOS to RAM and then copying it into MAP1 wouldn't be a problem, right?
kind reards
Yes that would work, even on a 32K machine as the DragonMMC has a 32K RAM onboard, as i wanted to be able to do the copy roms->ram and patch to ge the tape emulation to work, without having to distribute copies of the ROMS which where copyright MS.

I do want to put the source up on github, I'll need to do this for the AVR, 6809 and Verilog (CPLD) source. I'll see if I can get this done this weekend.

Cheers.

Phill.
pser1
Posts: 1655
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: Dragon MMC and AGD games

Post by pser1 »

prime wrote: Fri Jul 12, 2019 2:42 pm I do want to put the source up on github, I'll need to do this for the AVR, 6809 and Verilog (CPLD) source. I'll see if I can get this done this weekend.
Cheers.
Phill.
We are not in a hurry Phill, so you could put the sources on github when you have the time ...
When you'd tell us that this has been done I will give it a peek and try to find an easy (to me) way to reduce the DOS space
thanks a lot
pere
Post Reply