MAME Emulation

A place to discuss everything Dragon related that doesn't fall into the other categories.
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: MAME Emulation

Post by Pernod70 »

sixxie wrote: Mon Apr 22, 2019 9:05 am So it's testing both that it can modify the upper 32K of RAM in map type 1, and that that modification didn't cause a "shadow write" to the lower 32K.
Makes sense. The memory handling in the SAM implementation is quite convoluted, so not that easy to add mirroring, will persevere.
sixxie wrote: Mon Apr 22, 2019 10:28 am Out of interest, I was trying the same thing with CoCo emulations in MAME (same deal with 32K - not working), but I couldn't see how to launch a PAL CoCo2. Any ideas? I can see the PAL CoCo3 in the list...
There is no PAL CoCo2 :roll:
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: MAME Emulation

Post by sixxie »

Pernod70 wrote: Mon Apr 22, 2019 1:20 pm There is no PAL CoCo2 :roll:
That would explain that, then ;)

I guess if you can get the PAL Dragon support sorted, you're 99% of the way to adding PAL CoCos too. Only real variation to bear in mind is the clock to the VDG is stopped in slightly different places on the CoCo, and the duration varies. The Dragon stops it for 25 lines and 25 lines, the CoCo stops it for 26 lines and 24 lines. You can see the difference in Rommel's Revenge, if you want a test case.

Oh, I have a vague recollection that the HS IRQ is inverted too. Would have to check my code.
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: MAME Emulation

Post by robcfg »

Hi Nigel!

I'd like to tell that there's something off with the DAC sound emulation on MAME (tested on 0.202).

I made the following program to play 3000hz wav files on the Dragon, and it works on the real machine and on XRoar, but not on MAME, it remains silent.

Is that something you can take a look at?

Here's the source code:

Code: Select all

	ORG 20000
	orcc #$50 ; Disable Interrupts
	lda	$ff01			; Select DAC as sound source
	anda	#$f7
	sta	$ff01
	lda	$ff03
	anda	#$f7
	sta	$ff03

	lda	$ff21			; PIA direction
	anda #$FB
	sta	$ff21

	lda	$ff23			; Enable sound
	ora	#$8
	sta	$ff23

	LDX #$2328
doit LDA ,x+	; 5 cycles
	ANDA #$FC
	LDB #28

loop STA $FF20  ; 5 cycles
	DECB 		; 2 cycles
	BNE loop	; 3 cycles
	TFR x,d 	; 6 cycles
	CMPD #$4498 ; 8 cycles
	BEQ theend 	; 3 cycles
	LBRA doit	; 5 cycles	
theend ANDCC #$AF
	RTS
And attached is cas file with a sound to play and the above code compiled.

To run it, type:
CLOADM
CLOADM
EXEC 20000

Cheers, Rob
Attachments
vmailsnd.cas
(15.29 KiB) Downloaded 647 times
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: MAME Emulation

Post by Pernod70 »

I've fixed the cursor keys in natural keyboard mode, and also mirrored RAM in 32K machines to fix Dunjunz. It's a bit late to make it into this weeks 0.209 release so will have to wait until 0.210 due end of June unfortunately.

Haven't looked at the VDG artifacting issues yet, I need to do some reading on the 6847 to understand it better.

In the meantime I intend to update the software lists to current dragon archive. They were last synced 2 years ago so quite a few to add I guess, and quite a task to determine what's new without re-creating the whole list.
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: MAME Emulation

Post by Pernod70 »

robcfg wrote: Mon Apr 22, 2019 6:18 pm I'd like to tell that there's something off with the DAC sound emulation on MAME (tested on 0.202).

I made the following program to play 3000hz wav files on the Dragon, and it works on the real machine and on XRoar, but not on MAME, it remains silent.
I have no idea about this unfortunately. If you have an account at Mametesters https://mametesters.org it would be better posting the issue there so that other developers are aware of it, and someone with better DAC skills can take a look.

The VDG artifacting issue would also benefit from having an issue created.
Azerpy
Posts: 54
Joined: Tue Apr 09, 2019 1:16 pm
Location: France Pyrenées

Re: MAME Emulation

Post by Azerpy »

Thank you Pernod70 for the fix of the cursor keys in natural keyboard mode.
I have some new questions about using Mame 0.28 with Windows10 for emulation of Dragon 32, 64 and Dragon64plus.
I have put all the files I have (and use with Xroar) in Mame/roms but no one appears as "available". So I always start empty and there is no problem to load and run these files. I don't know if it is the correct way ?
Except for the other DOS than the DOS1.1 which is necessarily included in the romset. Can I use other DOS like DOS5Plus Extd ? and perhaps use DWLOAD with Becker Port ?
So my question is "can we change the DOS in Mame emulation of Dragon ?
Another question is about the facilities of use Mame. On the net, I see old pictures of Mess Windows, and on this forum you spoke two times of "menu bar" or "use new UI". Its seems for me not easy to change and load new files with keys scr lk, tab and these black and white windows.
So my question is "Is there in Mame a tool with menus I didn't find" ?
Thanks for all.
Alastair
Posts: 669
Joined: Fri Jul 18, 2008 11:33 pm

Re: MAME Emulation

Post by Alastair »

Azerpy wrote: Wed Apr 24, 2019 2:52 pm Another question is about the facilities of use Mame. On the net, I see old pictures of Mess Windows, and on this forum you spoke two times of "menu bar" or "use new UI". Its seems for me not easy to change and load new files with keys scr lk, tab and these black and white windows.
So my question is "Is there in Mame a tool with menus I didn't find" ?
There is a version of MAME for Windows called MAMEUI which contains the menu bar "NewUI" (ditto for MESSUI from the same place) - perhaps this is the version Pernod70 is talking about.
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: MAME Emulation

Post by robcfg »

Or you can use a frontend like Qmc2, for example.
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: MAME Emulation

Post by Pernod70 »

Azerpy wrote: Wed Apr 24, 2019 2:52 pm I have put all the files I have (and use with Xroar) in Mame/roms but no one appears as "available". So I always start empty and there is no problem to load and run these files. I don't know if it is the correct way ?
For machines to be shown as Available you must have an individual zip containing the required ROMs for that machine in your roms folder. You can easily check which ROMs are required by using the -listroms option from the commandline. So for Dragon 32 to be shown as Available you should have a dragon32.zip containing the following 2 files, similarly for Dragon 64 you should have a dragon64.zip containing 3 files.

Code: Select all

mame64 dragon32 -listroms
ROMs required for driver "dragon32".
Name                                   Size Checksum
d32.rom                               16384 CRC(e3879310) SHA1(f2dab125673e653995a83bf6b793e3390ec7f65a)
ddos10.rom                             8192 CRC(b44536f6) SHA1(a8918c71d319237c1e3155bb38620acb114a80bc)

mame64 dragon64 -listroms
ROMs required for driver "dragon64".
Name                                   Size Checksum
d64_1.rom                             16384 CRC(60a4634c) SHA1(f119506eaa3b4b70b9aa0dd83761e8cbe043d042)
d64_2.rom                             16384 CRC(17893a42) SHA1(e3c8986bb1d44269c4587b04f1ca27a70b0aaa2e)
ddos10.rom                             8192 CRC(b44536f6) SHA1(a8918c71d319237c1e3155bb38620acb114a80bc)
Azerpy wrote: Wed Apr 24, 2019 2:52 pm Except for the other DOS than the DOS1.1 which is necessarily included in the romset. Can I use other DOS like DOS5Plus Extd ? and perhaps use DWLOAD with Becker Port ?
So my question is "can we change the DOS in Mame emulation of Dragon ?
The DOS is loaded as a cartridge, and Dragon DOS is inserted by default. To change the cartridge you need to enter the MAME UI, by first enabling the UI by pressing ScrollLock, and opening it with Tab. This is the internal MAME menu system. Select File Manager, then cartridge (cart), then [software list], then Dragon cartridges. You should see a list of all supported cartridges including dospls49 (DOSPlus v4.9B).
To use items from the software list you obviously need the appropriate ROMs. So to use dospls49 you need file roms/dragon_cart/dospls49.zip containing the relevant ROM. All Dragon cartridges must be in the dragon_cart subfolder.
Azerpy wrote: Wed Apr 24, 2019 2:52 pm Another question is about the facilities of use Mame. On the net, I see old pictures of Mess Windows, and on this forum you spoke two times of "menu bar" or "use new UI". Its seems for me not easy to change and load new files with keys scr lk, tab and these black and white windows.
So my question is "Is there in Mame a tool with menus I didn't find" ?
Not sure which posts of mine you're referring to without a reference. As others have mentioned you can use a front-end such as QMC2 if you want a Windows style launcher with menus.
Azerpy
Posts: 54
Joined: Tue Apr 09, 2019 1:16 pm
Location: France Pyrenées

Re: MAME Emulation

Post by Azerpy »

Thank you for all your advice. I shall test those things : MAMEUI, QMC2, verify my roms and change of DOS.
Post Reply