CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: Bryce on 18:18, 12 March 12

Title: DMA Problem with ROMBoards
Post by: Bryce on 18:18, 12 March 12
Hi all,
     while experimenting with some hardware here, I encountered a strange/interesting issue with the CPC6128+. If I connect a MegaFlash to the Plus and then try to run something that uses DMA Sound, the CPC freezes. I've connected other ROMBoards and they do exactly the same, so it's not a dodgy MegaFlash. I also didn't have ROMs 0 or 7 enabled on the MegaFlash. I can see no hardware reason for this, unless it's a bug in the ASIC. Does anyone else have a Plus and a ROMBoard to test this? Is it just my Plus, or is it a design bug?

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 19:46, 12 March 12
Curious. I haven't got a ROMboard to test it with, but it seems odd that only DMA sound would cause it. Are you trying any particular software out? Does plus stuff which doesn't use DMA sound all work fine?
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 19:54, 12 March 12
I'm running the Diagnostic Cartridge. Everything including Sprites, 4096 Colours etc work fine. If a ROMBoard is plugged in the DMA Sound test freezes just before it should start playing music. This even happens if the ROMBoard has no ROMs installed. If I remove the ROMBoard the test runs as it should. The plus has no further mods or expansions connected at the time.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 21:08, 12 March 12
Does it crash if you try Burnin' Rubber? That uses the DMA for the tyre screech effect, so if it crashes then it probably rules out something like the diagnostics cart just doing something odd, like paging a ROM that wasn't expected or something.
I would have thought someone would have tried a ROMboard on a plus at some point in the past and I don't recall having ever heard of the issue before. I suppose it's not beyond the bounds of possibility that the DMA is putting values on the bus that might upset external hardware though.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 21:55, 12 March 12
Quote from: Bryce on 18:18, 12 March 12
Hi all,
     while experimenting with some hardware here, I encountered a strange/interesting issue with the CPC6128+. If I connect a MegaFlash to the Plus and then try to run something that uses DMA Sound, the CPC freezes. I've connected other ROMBoards and they do exactly the same, so it's not a dodgy MegaFlash. I also didn't have ROMs 0 or 7 enabled on the MegaFlash. I can see no hardware reason for this, unless it's a bug in the ASIC. Does anyone else have a Plus and a ROMBoard to test this? Is it just my Plus, or is it a design bug?

Bryce.

Well, I did run the Cadjo Clan DMA sound demo more often (it extensively uses DMA sound) and I always had connected a ROM-ROM-Box or an Eprom Card, or SF2. I never had problems. Maybe it's your Plus, but more comments on this topic would be beneficial.
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 22:37, 12 March 12
Quote from: andycadley on 21:08, 12 March 12
Does it crash if you try Burnin' Rubber? That uses the DMA for the tyre screech effect, so if it crashes then it probably rules out something like the diagnostics cart just doing something odd, like paging a ROM that wasn't expected or something.

I just had a quick 10 minute blast on Burnin' Rubber on my 6128+ with the Megaflash plugged in and it was fine...
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 22:43, 12 March 12
So did I, so it's not the DMA sound, but something the Diagnostic Cartridge is doing. Unfortunately, FOS doea exactly the same freeze on mine. Can you install and start FOS on your MegaFlash and see if it crashes or your Plus?

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 04:36, 13 March 12
Quote from: Bryce on 22:43, 12 March 12
Can you install and start FOS on your MegaFlash and see if it crashes or your Plus?

Bryce.

All 6128 Plus and MegaFlash owners are called for help!  :)


FutureOS Plus does:

- Unlock the ASIC
- Write 256 byte to first hardware sprite
- Change X, Y coordinates of the first hardware sprite according to input devices
- Checks the analogue port constantly (for mouse arrow movement)
- (Therefore the Memory mapped page gets activated / deactivated)

That's all what it does IIRC. Shouldn't be a problem


Differences to Cadjo Clan demo: Mainly the check of the analogue joystick port
Title: Re: DMA Problem with ROMBoards
Post by: Executioner on 04:47, 13 March 12
It sounds to me like it may be a conflict with the secondary ROM mapping register, although I can't see why FOS would be using that. Does Frogger work with the ROM board?
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 09:21, 13 March 12
Haven't checked frogger yet.

@TFM: The strange bit is, it's not just the Plus Version of FOS that crashes the Plus, the standard version does the same.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: Ygdrazil on 12:29, 13 March 12
@Bryce

you sure move around!  ;D

Quote from: Bryce on 09:21, 13 March 12
Haven't checked frogger yet.

@TFM: The strange bit is, it's not just the Plus Version of FOS that crashes the Plus, the standard version does the same.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 13:15, 13 March 12
Just tried Frogger with the Megaflash plugged in and seems fine for me. If I get time tonight I'll try to put FOS on the megaflash and give it a go if my simple brain can work out how to do it - I've only just put the HxC as b drive and haven't added anything to the megaflash yet - how lazy am I?  ;D
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 13:27, 13 March 12
I'm beginning to think that it has something to do with keyboard scanning. The diagnostic Cartridge also starts scanning the keyboard at exactly the same time as it starts the DMA music.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 14:58, 13 March 12
Quote from: Bryce on 13:27, 13 March 12
I'm beginning to think that it has something to do with keyboard scanning. The diagnostic Cartridge also starts scanning the keyboard at exactly the same time as it starts the DMA music.

Bryce.
it may be a bug in the cartridge.

the test cartridge activates rom 1 in the range &c000-&ffff. I think it means to access &81 to ensure it gets the cartridge page.
this part of the cartridge is meant to contain sound data I think which is copied to ram and played.

the rom in the expansion board takes priority, it then tries to play it.. perhaps it then ends up with an interrupt which is never acknowledged and it locks up.


Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 15:13, 13 March 12
Arnoldemu, I tip my my hat in recognition in your general direction. That's the first decent explaination I've heard, why it might not work. Now I need to find out whether this is or a similar bug is why FOS doesn't run, or whether it's something completely different.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 15:46, 13 March 12
Quote from: Bryce on 09:21, 13 March 12
Haven't checked frogger yet.

@TFM: The strange bit is, it's not just the Plus Version of FOS that crashes the Plus, the standard version does the same.

Bryce.

It uses RAM configuration &7FC3 (a bit unusual), so it's RAM mapping... This comes close to that what the Executioner said. Maybe... something connected to banking. You can play a bit with OUT commands...

Quote from: beaker on 13:15, 13 March 12
If I get time tonight I'll try to put FOS on the megaflash and give it a go if my simple brain can work out how to do it - I've only just put the HxC as b drive ...

Ok, just move the mouse arrow over the letters, click, then click at the DIR icon. Click at a filename and then the RUN icon (but the filename should be a FutureOS program).

Short description here: http://www.colorado-boys-muenchen.de/users/futureos/files/FutureOS_Manual.doc (http://www.colorado-boys-muenchen.de/users/futureos/files/FutureOS_Manual.doc)

Some more information here: http://www.colorado-boys-muenchen.de/users/futureos/files/FutureOS%20Handbook.docx (http://www.colorado-boys-muenchen.de/users/futureos/files/FutureOS%20Handbook.docx)

Quote from: arnoldemu on 14:58, 13 March 12
the rom in the expansion board takes priority, it then tries to play it.. perhaps it then ends up with an interrupt which is never acknowledged and it locks up.

Well, wouldn't in this case all ROMs cause troubles?
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 15:53, 13 March 12
Do both Versions of FOS (Plus and standard) do this?

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 15:58, 13 March 12
Quote from: Bryce on 15:53, 13 March 12
Do both Versions of FOS (Plus and standard) do this?

Bryce.

Yes, both use RAM config &C3, and also CP/M Plus does it. Just start CP/M Plus and check if it runs, also give SOS a try, it also uses &C3.
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 16:04, 13 March 12
SOS was my next on the list to try :) I want to try all the previous things on a classic CPC first (other than diagnostics), to rule out any problems with the MegaFlash and the FOS installation, then I will try out SOS (after testing your Init routine of course! :D )

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 16:06, 13 March 12
Thanks' Bryce! Even in the darkest hours you still think about other people first! You'll be always a hero of the CPC scene  :) :) :)
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 16:08, 13 March 12
It's not dark yet, it's only 4:10 here :D

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 18:48, 13 March 12
Quote from: TFM/FS on 15:46, 13 March 12

Well, wouldn't in this case all ROMs cause troubles?

All expansion roms in slot 1 could cause trouble when running the plus diagnostic cart and running the dma sound test, because the rom on the expansion board takes priority over cartridge roms *when* you choose them like a normal rom:

e.g.
ld bc,&df01
out (c),c

compared to the correct way:
ld bc,&df81
out (c),c

which should not cause problems and specifically chooses bank 1 of the cartridge rom.. but then also depends on how the expansion board decodes the rom select bits. (does it only decode lower 4 bits... and then the effect is the same.. or...)

and it also depends on what data they in them at the location the diagnostic cart wants to read.

the lockup sounds like it could be an interrupt that is never acknowledged.. but I don't know without simulating it.

As for the c3 problem, this is likely to be different?
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 23:53, 13 March 12
Unlike cheaper ROMBoards from the 80's/90's the MegaFlash does decode all 8 bits from D0 to D7, does this mean it shouldn't have this issue?

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 00:05, 14 March 12
It means it should be fine if the cartridge software is doing what it's supposed to, but might go wrong if the cartridge software is trying to page it's ROMs using ROM numbers  < 15 (but there really isn't anything you could do about that)
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 01:14, 14 March 12
Quote from: Bryce on 22:43, 12 March 12
So did I, so it's not the DMA sound, but something the Diagnostic Cartridge is doing. Unfortunately, FOS doea exactly the same freeze on mine. Can you install and start FOS on your MegaFlash and see if it crashes or your Plus?

Bryce.

Thanks TFM for the document links.

OK, I want to check I am not being stupid as mine also crashed as well as soon as I loaded the desktop. Let me know if there's a better way of doing this as I am guessing all the way here. I downloaded FutureOS_System_.8_Preview!!!.zip from FutureOS - The revolutionary UltraOS for the CPC6128 and CPCPlus (http://www.colorado-boys-muenchen.de/users/futureos/) and extracted 180 FutureOS-ROMs .8 English 2011-10-10.dsk which I opened in the HxC floppy emulator software and exported to a .hfe file. I then used disckit3 in cpm to copy the image from the HxC to a real floppy in drive a. First I tried to use the rom manger from basic (-rma) to copy the rom images myself but that didn't really work when I typed |fdesk so I ran the disc.bas and chose option 7 even though it was meant for the original 6128. This put the roms in the following positions:

[attach=2]

When I boot up the CPC I get this:

[attach=3]

When I run |fdesk I get the following screen but the CPC appears frozen. The pointer won't move using either the cursor keys nor the using the direction buttons on the pad.

[attach=4]

Was this what you were expecting Bryce? Sorry I can't be more help; I am not hugely knowledgable about the CPC having only really used the 464 as a games machine as a kid...
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 09:25, 14 March 12
Hi beaker,
       that's really good for me and bad for TFM. This is exactly what happens on my CPC too, which means it's not my CPC that's broken (the good bit), unfortunately it means for TFM that something is a miss in his FOS, more experimenting will be required I think, to find out what's freezing FOS on the Plus. I tried the same MegaFlash and FOS on a Classic CPC last night and it works as expected.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 10:19, 14 March 12
Quote from: andycadley on 00:05, 14 March 12
It means it should be fine if the cartridge software is doing what it's supposed to, but might go wrong if the cartridge software is trying to page it's ROMs using ROM numbers  < 15 (but there really isn't anything you could do about that)
and the diagnostic cartridge does exactly this.
Title: Re: DMA Problem with ROMBoards
Post by: 00WReX on 10:24, 14 March 12
Sorry, I'm coming in on this conversation after only a quick read...

But looking at the screenshots from beaker, FuturOS is in ROM positions 10, 18, 19, 20.
I'm pretty sure FutureOS is fixed to positions 10, 11, 12, 13.
The second screenshot would also indicate this is the case as only the one FutureOS line appears in the boot screen...usually you see 4 lines.

Probably why the FutureOS desktop is crashing in this case...

Cheers,
Shane
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 10:48, 14 March 12
No, the FOS Loader installs them to those positions and as I mentioned above, that configuration works perfectly on the Classic 6128. Only the first FOS ROM will be "seen" by the CPC, because it only scans the first 16 ROMs on start, but FOS will (should) still work fine like that.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: 00WReX on 10:55, 14 March 12
Ahh, cool...I've never used the loader to install them, only manually assigned them...and for that the ROM table on the wiki mentions 10-13 fixed.

Sorry...please continue  :D

Cheers,
Shane
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 11:16, 14 March 12
Yeah I saw that on the ROM_Table list too, but I don't think it's correct. You can get the Auto-installer here: FutureOS - The revolutionary UltraOS for the CPC6128 and CPCPlus (http://www.colorado-boys-muenchen.de/users/futureos/) (very first link at the top).

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 11:17, 14 March 12
If FutureOS is loading fine but not responding to any keypresses, could it just be the age old Plus keyscanning issue?
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 11:48, 14 March 12
I swapped the roms to the positions 10, 11, 12 and 13 just in case and it crashed in a whole new way... It didn't even get to the desktop.
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 12:37, 14 March 12
@andy: I wasn't aware of an "age old Plus keysanning issue" do you have more info on this?

@beaker (and TFM): I suspect that's a different issue. I also tried moving ROMs last night with the ROManager and the ROMs were corrupted after the move. Try manually installing the 3 ROMs in positions 11-13.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 14:36, 14 March 12
When scanning the keyboard you're supposed to put the PSG into an 'inactive' state at various points in order to clear the latches. It doesn't matter on old CPC's if you do this, because the version of the 8255 they have does it automatically and so some coders skipped it to save a bit of time. However it does matter on the Plus, because the ASIC emulation needs you to do this to function properly. This was probably the #1 cause of old software being incompatible with the Plus machines.

Unofficial Amstrad WWW Resource (http://www.cpctech.org.uk/docs/keyboard.html) has details on keyscanning, with the appropriate steps required on the Plus highlighted.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 17:37, 14 March 12
Quote from: beaker on 01:14, 14 March 12

Thanks TFM for the document links.

Your are welcome  :)

Quote from: beaker on 01:14, 14 March 12
OK, I want to check I am not being stupid as mine also crashed as well as soon as I loaded the desktop. Let me know if there's a better way of doing this as I am guessing all the way here. I downloaded FutureOS_System_.8_Preview!!!.zip from FutureOS - The revolutionary UltraOS for the CPC6128 and CPCPlus (http://www.colorado-boys-muenchen.de/users/futureos/) and extracted 180 FutureOS-ROMs .8 English 2011-10-10.dsk which I opened in the HxC floppy emulator software and exported to a .hfe file. I then used disckit3 in cpm to copy the image from the HxC to a real floppy in drive a. First I tried to use the rom manger from basic (-rma) to copy the rom images myself but that didn't really work when I typed |fdesk so I ran the disc.bas and chose option 7 even though it was meant for the original 6128. This put the roms in the following positions:

...snip


Please use the installer. The installer is needed to adapt the hardcoded ROM numbers in the ROMs (&FF00-&FFFF). If you don't use the installer if will not run (IMHO). (The preselected ROM numbers are 10,11,12, 13 - the installer changes them to 10, 18,19,20).


Quote from: beaker on 01:14, 14 March 12
When I run |fdesk I get the following screen but the CPC appears frozen. The pointer won't move using either the cursor keys nor the using the direction buttons on the pad.

Please use the |OS command to use FutureOS regularly.

If you use the |fdesk command then you lack 48 KB of space, because FutureOS saves the first 48 KB of RAM and reinstalls them after leaving it. If you work with 128 KB, then 48 KB is a lot. So better use the |OS command.  Also the |fdesk command can cause problems in few cases, this depends wether other ROMs are connected of not.

If you start the installer from the original disc image, then you will have no problem to install and use FutureOS.

In case you like your personal version of FutureOS for the MegaFlash with ROM numbers selected by yourself, just PM me.

Let me know if I can help in any other way.

Title: Re: DMA Problem with ROMBoards
Post by: TFM on 17:45, 14 March 12
Quote from: andycadley on 11:17, 14 March 12
If FutureOS is loading fine but not responding to any keypresses, could it just be the age old Plus keyscanning issue?

Well, no. The FutureOS for non-Plus CPCs runs on both, CPC old generation and 6128 Plus. It issue here is clearly the assignment of the ROM numbers.

Explained in detail: The Installation disc provides programs to install the OS to a ROM-RAM-Box, a SF2 and the new MegaFlash. However the installer installs them at 10-13 on a RRB, but at 10, 18-20 on a MegaFlash.
The ROM files on disc are hardcoded to 10-13, so you can install them by had to 10,11,12 and 13. But if you want to install them to 10, 18, 19 and 20 (MegaFlash suggested numbers) then the installer program is needed, because it changes the ROM files to work a the new places.

I know this hardcoded ROM numbers are a bit nasty, but as long as you use the installer on disc (which works well) there will be no problems. The reason for using hardcoded numbers is a drastic gain in speed.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 17:50, 14 March 12
Quote from: Bryce on 12:37, 14 March 12
... I also tried moving ROMs last night with the ROManager and the ROMs were corrupted after the move.

Don't move the FutureOS ROMs with the ROManager (for FutureOS), that's like pulling away the carpet you are staing on.

And don't move FutureOS ROMs in general, because they have hardcoded numbers. You can patch the installer if you want other ROM numbers (both BASIC and MC part!). More easy: Tell me your desired numbers, I patch the installer for you.  :)

Quote from: Bryce on 12:37, 14 March 12
Try manually installing the 3 ROMs in positions 11-13.

Please don't! Please ALWAYS use the installer! It's needed to adapt the hardcoded ROM numbers inside all ROM files.
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 18:51, 14 March 12
Quote from: TFM/FS on 17:37, 14 March 12
Please use the installer. The installer is needed to adapt the hardcoded ROM numbers in the ROMs (&FF00-&FFFF). If you don't use the installer if will not run (IMHO). (The preselected ROM numbers are 10,11,12, 13 - the installer changes them to 10, 18,19,20).
...
Let me know if I can help in any other way.


Hi TFM, thanks for offer.

I removed the roms using rom manager and used the installer and selected option 7 and followed the instructions:

[attach=2]

I then checked the position of the ROMs using the rom manager software and it is indeed at 10, 18-20.

[attach=5]

I then typed |OS as you suggest and FutureOS loaded but the CPC appears to have locked up.

[attach=3]

I couldn't use the pad or the cursor keys to move the cursor around.

[attach=4]
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 19:35, 14 March 12
Oh, that's strange!!!

Some stupid quesions: You use a regualar 6128 - Yes. Ok.

Hmmm.... Is there a possibility that the disc image is corrupted? (Maybe you can download it directly and use it on disc (CPCDiskXP), without the HxC, even if I see no reason for prolems here).


Ok, can you just save the four FutureOS ROMs (using ROManager or whatever), put them on a DSK file and send/email the DSK to me (futuresoft at gmx . de)? Then I can check if there is a problem.


Mystic mystery...
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 19:57, 14 March 12
Aye, it is strange to be sure...

It's pretty much a standard 6128+ with a tape mod and Parados 1.1 hacked cartridge that came with the machine. It's just got the megaflash and HxC connected as you can see in the attached photo. I'll try and grab a copy of the roms I have installed - not quite sure how I transfer them to a dsk file at the moment...  :-[

I'll also look into the CPCDiskXP and try another disk to rule that out, although it's also strange that Bryce is having the same issues which is why I tried my machine. I'll let you know how it goes  :D
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 20:49, 14 March 12
Nice setup btw!  :)  Looks great!  :)



Well, if the same installation works on the CPC old generation, then this would point to the possibility, that only _SOME_ 6128 Plus have problems. (And the nature of this problem is unknown to me, maybe it's connected to ASIC revisions. But we can elucidate this later).
Title: Re: DMA Problem with ROMBoards
Post by: fatbob on 20:51, 14 March 12
I have just tested a new download of FutureOS on my 6128+ with Megaflash  and had the exact same problems as reported by Beaker & Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 20:55, 14 March 12
Quote from: fatbob on 20:51, 14 March 12
I have just tested a new download of FutureOS on my 6128+ with Megaflash  and had the exact same problems as reported by Beaker & Bryce.

Did you use the version for CPC old generaton or for CPC Plus? (I mean the installation). (Well, the Plus version is German-only right now.). So you did probably use the version for the CPC old generation, right?

Title: Re: DMA Problem with ROMBoards
Post by: fatbob on 21:10, 14 March 12
Quote from: TFM/FS on 20:55, 14 March 12

Did you use the version for CPC old generaton or for CPC Plus? (I mean the installation). (Well, the Plus version is German-only right now.). So you did probably use the version for the CPC old generation, right?

I have just checked the German version as well (using option 8 on the menu) and get the same Lock-Up. The only difference is on the German version the cursor is Cyan.

I have tried it with the standard Burning Rubber/OS cartridge (the only one I have) and with PARADOS selected in rom slot 7 but sadly get the same result with both.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 21:35, 14 March 12
I just simulated the installation process of the FutureOS for CPC old generation with WinCPC (in WinCPC ROMs 16-31 are a mirror of ROMs 0-15!). Everything went well. I assume it's a 6128Plus specific problem.

The DOS (Parados/Amsdos) doesn't matter since the installer uses the BASIC command LOAD to load files. And IMHO every DOS does support that.

Can somebody please do the following:

- Install FutureOS into the MegaFlash on an CPC old Generation (CPCoG)
- Check if it works. If yes...
- Move the MegaFlash to a 6128Plus
- Check agian if it works

This could tell us more.
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 21:56, 14 March 12
Quote from: Bryce on 09:25, 14 March 12
unfortunately it means for TFM that something is a miss in his FOS, more experimenting will be required I think, to find out what's freezing FOS on the Plus. I tried the same MegaFlash and FOS on a Classic CPC last night and it works as expected.

I think Bryce has already tried this...
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 22:00, 14 March 12
Ok, so it's definitively a problem of the CPC Plus hardware.

Well, I can access my Plus in two month  :(  But that's actually not that bad, since I see it only once a year.

Title: Re: DMA Problem with ROMBoards
Post by: beaker on 23:10, 14 March 12
Cool  :D 

What's the story with your Plus?
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 03:18, 15 March 12
Quote from: beaker on 23:10, 14 March 12
Cool  :D 

What's the story with your Plus?

Old story. I live in USA since 3 years, 5 months, 14 days and counting... And all my CPC equipment is in good old Munich. Now I have two weeks of years leave evey year... And that's the time I have to check all that stuff I created on emulators. Hopefully I'll find a job in Germany soon (or any Europen county where German don't get hunted down due to our Chancellor  ;) ). Can't wait to go to Spanish & French meetings!


EDIT: Back to topic! I just used Markus new JavaCPC (which now supports 32 ROMs!!! Great Work Markus!!!). And everything runs well. Again this result points to a speciality of the 6128Plus. But not every Plus I do assume.
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 10:23, 15 March 12
Here's a summary of what I tested and the results:

FOS (oG) installed with installer using a 6128+ : Crashes on Plus, but runs perfectly on Classic 6128.
FOS (Plus) installed with installer using a 6128+ : Crashes on Plus.
FOS (oG) installed with installer using a Classic 6128 : Crashes on Plus, but runs perfectly on Classic 6128.

I haven't tried manually installing the old "10-13" FOS ROMs, but I might give it a go tonight.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: MacDeath on 16:20, 15 March 12
QuoteOk, so it's definitively a problem of the CPC Plus hardware.
The PLUS' DMA sound channels were already notorious for being bugged a lot...
That's even a miracle it is possible to actually use them somewhat. :laugh:


rick dangerous 128PLUS does use some DMA...
Have you tried it with the RomBoards plugged ?
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 16:32, 15 March 12
No, because other DMA sound games (Burnin' rubber) works fine, but maybe I will give that a go too.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: MaV on 18:29, 15 March 12
Quote from: Bryce on 16:32, 15 March 12
No, because other DMA sound games (Burnin' rubber) works fine, but maybe I will give that a go too.

I tested that configuration: CPC 6128+ with the ROM board and Rick Dangerous+. That worked ok, but my Megaflash does not contain FOS yet.
Title: Re: DMA Problem with ROMBoards
Post by: MacDeath on 18:49, 15 March 12
QuoteNo, because other DMA sound games (Burnin' rubber) works fine
Well, burning rubber cartridge is a ROM based game, while rick is a "RAM based game".

haven't understood all (tl dr sort of) but... what is the problem/issue ?

the DMA jam the computer when you use some test routines from a test cartridge ?
Or is the test program ROMboard based (FOS program) ?
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 19:25, 15 March 12
IMHO it's worth giving RD+ a chance. And if it runs - great - play the nice game a while. If not, you are one step forward.
Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 19:35, 15 March 12
Quote from: MacDeath on 18:49, 15 March 12
the DMA jam the computer when you use some test routines from a test cartridge ?
Or is the test program ROMboard based (FOS program) ?
DMA was just a red herring. The problem was that the Amstrad Test Cartridge incorrectly pages one of the normal ROMs when it ought to page in one of the cartridge ROMs. If there aren't any external ROMs, that's fine and it just works, but with a ROMBoard attached it causes a crash. It only appeared to have anything to do with DMA because the test cartridge just happened to be using the ROM in question for it's DMA routines.
I'm still putting money on the issue lying with the keyscan routines.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 20:07, 15 March 12
Quote from: andycadley on 19:35, 15 March 12
... The problem was that the Amstrad Test Cartridge incorrectly pages one of the normal ROMs when it ought to page in one of the cartridge ROMs. If there aren't any external ROMs, that's fine and it just works, but with a ROMBoard attached it causes a crash.

Ah! Got it now! Thanks' for telling us!!!  :) :) :)
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 22:16, 15 March 12
Quote from: Bryce on 10:23, 15 March 12
Here's a summary of what I tested and the results:

FOS (oG) installed with installer using a 6128+ : Crashes on Plus, but runs perfectly on Classic 6128.
FOS (Plus) installed with installer using a 6128+ : Crashes on Plus.
FOS (oG) installed with installer using a Classic 6128 : Crashes on Plus, but runs perfectly on Classic 6128.

I just simulated the process of installing FutureOS (oG) on the 6128 Plus using the WinApe emulator. On WinApe everything runs well. I can't find any problem.

@Bryce: Can you read out the ROMs which aren't working with the Plus and send them (in any format) to me? Maybe I can find a problem in them!?!

Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 00:06, 16 March 12
Will that really help? The fact that these images work on the Classic CPC would suggest that they have been correctly saved on the MegaFlash.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: MacDeath on 01:01, 16 March 12
Keyboard faulty test routine is the major uncompatible issue between Old (CPC) and Plus (yeah, those ones... + ...)... even according to CPCpowar site (french, ok... you got a point...)

you know, the "barbarian" (palace soft... the first, not the  "barbar2" cartridge... off course...) doesn't work on "PLUS" stuff...

ASIC was already know to screw up many things...
Also GX4000 is not supposed to have extra stuff on an extpansion port... will 6128/464/PLUS are just some sort of by-products ordered in order to use old parts... :(

And last, IMO, DMA aren't supposed to work that well on CPCs...
I mean instead of a proper RAM/ROM/Memory/VRAM management, we had some wait state put on the CPU (Z80...) so the w<hole stuff is even slowlier than a properly used Speccy...
(sacrify 32K of RAM and you get a 192x256x16 instead of a 256x192x2(8/16 attributed))

While not the baddest 8bit computer, the PLUS was still a rushed affair...

Also the PLUS' ROM management have to deal with both cartridge and Expansion port ones.
And most über alles... those ROMboxes and "FOS" were doen a large era after....
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 01:27, 16 March 12
Quote from: MacDeath on 01:01, 16 March 12
you know, the "barbarian" (palace soft... the first, not the  "barbar2" cartridge... off course...) doesn't work on "PLUS" stuff...

Myth: History in the Making wasn't another one was it? Just trying it now and it gets to the credit screen and just locks up  :'(
I think I am going to invest in a classic CPC 6128 at this rate  :D
Title: Re: DMA Problem with ROMBoards
Post by: MacDeath on 01:34, 16 March 12
QuoteI think I am going to invest in a classic CPC 6128 at this rate
CPC6128 is best CPC actually... Tape AND Disks... in a compact design... with actually the exact amount of minimum RAM actually needed by such kind of computer.

PLUS range wasn't that complete despite the same mainboard with 464 and 6128... (both uncomplete, but completable....)

CPC664 is Disk version of CPC464... and blue keys are nice indeed... (yet faulty keyboard most of time)
but CPC6128 is to me what CPC should always have been... (in colour monitor it is always better too...) : the "real actual"default config...

But yeah... many games were "recently homebrew patched" in order to deal with "PLUSes"...

Just lurk more at CPCpower ...

Also must check wether the burnin'rubber Basic or the Basic1.1 cartridge is in use... (the one without the game... supposed to deal with more compatibilties issues...)
Title: Re: DMA Problem with ROMBoards
Post by: beaker on 02:14, 16 March 12
Thanks for the advice MacDeath - I totally agree with you, the original 6128 was the better machine. I had the 464 as a kid, then bought the original 6128 about 8 years ago but sold both before I moved 5 years ago. Always fancied a 6128+ after seeing Prehistorik 2 in AA back in 90's so decided to treat myself at the end of last year. I'll have to buy one again and run both  :D

Just going to look at CPCpower now...
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 02:50, 16 March 12
Quote from: Bryce on 00:06, 16 March 12
Will that really help? The fact that these images work on the Classic CPC would suggest that they have been correctly saved on the MegaFlash.

Bryce.

Well, I can't reproduce the problem with any kind of emulators (even when using 32 ROMs on WinApe). So I'm at a point where I don't know what to do.

Maybe the installation was faulty. I got not idea ...

Title: Re: DMA Problem with ROMBoards
Post by: andycadley on 07:43, 16 March 12
Quote from: TFM/FS on 02:50, 16 March 12

Well, I can't reproduce the problem with any kind of emulators (even when using 32 ROMs on WinApe). So I'm at a point where I don't know what to do.
I don't think any emulators bother to emulate the issue with keyscanning routines when using a Plus model.
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 09:34, 16 March 12
I also don't think the emulators are 100% identical to the real hardware, so you (TFM) are probably going to have to wait until you have access to a real Plus.

I have my original 464, a 6128 and a 6128+ so that I can test my hardware on almost all situations. It's always good to know that the hardware will work on all machines. I use the 6128+ the most, but only because it takes up less desk space. The Classic 6128 is still my favourite. Although the Plus has to deal with both Cartridge and expansion ROMs, from a hardware point of view, they did it rather well and it's pretty transparent to the hardware designer.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 10:02, 16 March 12
Quote from: andycadley on 07:43, 16 March 12
I don't think any emulators bother to emulate the issue with keyscanning routines when using a Plus model.
Arnold emulator does.
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 10:11, 16 March 12
Will it also allow you to emulate a ROM Board connected and crash when the DMA test runs?

Just for my understanding (I know nothing about emulation): How do you go about fully emulating the ASIC, when the source code of the ASIC is unknown?

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 10:21, 16 March 12
Quote from: Bryce on 10:11, 16 March 12
Will it also allow you to emulate a ROM Board connected and crash when the DMA test runs?
it might do. If it doesn't I'll make sure it does. (you have proven the hardware already crashes - I may need to test it on my cpcs to confirm exact operation).


Quote from: Bryce on 10:11, 16 March 12
Just for my understanding (I know nothing about emulation): How do you go about fully emulating the ASIC, when the source code of the ASIC is unknown?
I write lots of programs which exercise particular hardware features, I even try and get it to do things it is not documented to do, just to see what it actually does (often it is what is documented, but sometimes not always).  I try to read/write every byte I can and I find out interesting things.
Once I find something weird I try to find the pattern to work out what it's doing.

The emulator is a simulation, it has functions to handle reading from memory, reading from I/o port, writing to memory, writing to i/o ports.
It takes address and data. I need to simulate the same results you would see on a real machine when you do the same operations.

Timing is not perfect, because I don't go down to the exact clock cycle on most things. At most I update every 4T states, because that is the speed for memory read/write and i/o read/write, but it's often accurate enough for almost all.

So the quick answer is: I test it, and I try to do things that are not documented.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 14:56, 16 March 12
Quote from: Bryce on 18:18, 12 March 12
Hi all,
     while experimenting with some hardware here, I encountered a strange/interesting issue with the CPC6128+. If I connect a MegaFlash to the Plus and then try to run something that uses DMA Sound, the CPC freezes. I've connected other ROMBoards and they do exactly the same, so it's not a dodgy MegaFlash. I also didn't have ROMs 0 or 7 enabled on the MegaFlash. I can see no hardware reason for this, unless it's a bug in the ASIC. Does anyone else have a Plus and a ROMBoard to test this? Is it just my Plus, or is it a design bug?

Bryce.
Which roms did you have set in the megaflash, especially in slot position 1?

In Arnold: If I set the "chuckie egg" rom into position 1 in the "emulated" megarom (flash part not emulated yet ;) ), and I run the dma test, it doesn't show the keyboard part of the test and quits out.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 14:59, 16 March 12
Quote from: Bryce on 19:54, 12 March 12
I'm running the Diagnostic Cartridge. Everything including Sprites, 4096 Colours etc work fine. If a ROMBoard is plugged in the DMA Sound test freezes just before it should start playing music. This even happens if the ROMBoard has no ROMs installed. If I remove the ROMBoard the test runs as it should. The plus has no further mods or expansions connected at the time.

Bryce.
no roms are active..?
so romdis is never asserted?
Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 15:06, 16 March 12
Ah, that's not how real hardware works. Even if you connect an empty ROMBoard, it will still set ROMDIS if you try to access an empty slot.

I had nothing installed in position 1.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: arnoldemu on 15:27, 16 March 12
Quote from: Bryce on 15:06, 16 March 12
Ah, that's not how real hardware works. Even if you connect an empty ROMBoard, it will still set ROMDIS if you try to access an empty slot.

I had nothing installed in position 1.

Bryce.
no, not all rom boards do this.

I think they only assert romdis if the slot has been made active with a switch... does the megarom do the same?
so cpu is essentially reading 0x0ff for that rom data.

I've seen that normally if the switch is off on a romboard, you will see basic rom data at this slot because that is the "default" when romdis is not asserted.


Title: Re: DMA Problem with ROMBoards
Post by: Bryce on 16:11, 16 March 12
Oh yeah, that's true, I forgot about ROMBoards with the switches. The MegaFlash doesn't do that, mainly because the individual switches take up too much space and with a single Flash instead of multiple EPROMs, the switching is rather more complicated, so I decided not to incorporate that feature.
The MegaFlash sets ROMDIS if any ROM between 0 and 31 is initialised (except 0 an 7 which can and need to be seperately fully disabled), but the CPC just sees 16K full of &FF if the slot is empty.

Bryce.
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 16:43, 16 March 12
Quote from: arnoldemu on 10:02, 16 March 12
Arnold emulator does.

I tested all that stuff (on a friends PC, late last night, now he has his first CPC emulator *hehe*) and it all works.

So keyscanning is not the issue. This is supported by the fact that I never had problems with my own CPCoG and 6128Plus machines. However I don't exclude the keyscanning completely, just for a feeling in the stomic... (Maybe I should get breakfast now...).
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 16:51, 16 March 12
Quote from: arnoldemu on 15:27, 16 March 12
I've seen that normally if the switch is off on a romboard, you will see basic rom data at this slot because that is the "default" when romdis is not asserted.

I've seen this with EPROM cards too (Dobbertin, SuperROMPlus).
But MegaFlash, SF2 and the RRB provide always 512 KB external (simulated) ROM.

You are both right. But it never seemed to me to be a problem. On the other hand it's known that the SF2 has issues on the CPC Plus, so maybe THIS is the reason?
Title: Re: DMA Problem with ROMBoards
Post by: Executioner on 23:40, 18 March 12
Quote from: andycadley on 07:43, 16 March 12
I don't think any emulators bother to emulate the issue with keyscanning routines when using a Plus model.

WinAPE does emulate this. Just check "Plus PPI emulation".
Title: Re: DMA Problem with ROMBoards
Post by: TFM on 17:15, 19 March 12
Quote from: Executioner on 23:40, 18 March 12
WinAPE does emulate this. Just check "Plus PPI emulation".

Yes, and I can confirm that working very well/precisely. I could not see a difference to a real Plus (regarding keyscanning or PIO). Compliments for WinApe at this place.  :)
Powered by SMFPacks Menu Editor Mod