News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Convert .CPR to .DSK

Started by Retroash, 11:33, 08 June 17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Retroash

Hello Friends.

I am a massive Amstrad fan.

I was wondering if its possible to convert .CPR to .DSK.

Reason why I ask is so I play the gx4000 converted games on the caprice libretro core within retroarch on my NVidia Shield.

Specifically games like Fruit Machine by Amsoft. I found a converted .dsk of renegade with works perfectly.

Any help will be greatly received.

Thank you.

Ashley


Skunkfish

Can't you just download the original .DSK versions?

I'm confused...  ???
An expanding array of hardware available at www.cpcstore.co.uk (and issue 4 of CPC Fanzine!)

arnoldemu

Does caprice libretro core allow you to map the nvidia buttons/directions to keys on the cpc keyboard or is it mapped to joystick only?

I guess you want the cpr->dsk because these games have been patched to work on joystick only controls and caprice (last time I looked anyway) doesn't emulate the plus machines or gx4000?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Retroash

Games that require keyboard intervention like Amsoft's Fruit Machine cannot be played on a joypad and RetroArch doesn't allow you to map keyboard keys to joypad.

The GX converted games would be prefect but the core only plays .dsk files.

arnoldemu

Quote from: Retroash on 13:15, 08 June 17
Games that require keyboard intervention like Amsoft's Fruit Machine cannot be played on a joypad and RetroArch doesn't allow you to map keyboard keys to joypad.

The GX converted games would be prefect but the core only plays .dsk files.
ok. It is theoretically possible to convert some of the cprs back to dsks (as long as they are made with nocart and have not had plus features patched into them) but no tool currently exists to do that.

The problem you would have is launching the disks, cprs are autoboot because of their nature, but dsks are not. So you would need to run the dsk in the same way as you would any other dsk.

EDIT: I made the nocart tool btw.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Retroash

Thank you for the reply. The Caprice libretro core auto runs disk images but like you said no tool exists. which is a shame. O Well. Thank you for you help.

The only hope is if they add .cpr support to the core.

Amstrad emulation isn't really that well supported on Android.

remax

#6
perhaps try the MAME core...


It has support for GX4000, but i don't know if it's easy to use under Retroarch


Another solution i need to create a topic for, is the new CrocoDS core and the kcr format. It allows to autorun and map any button to any key. But you need to create a sna and edit a txt file. So it's a bit of work for every game.
Brain Radioactivity

arnoldemu

Quote from: Retroash on 13:42, 08 June 17
Amstrad emulation isn't really that well supported on Android.
I am now tempted to convert arnold to work on android...
and also to make a cpr to dsk tool for the nocart conversions.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Retroash

Quote from: arnoldemu on 09:15, 09 June 17
I am now tempted to convert arnold to work on android...
and also to make a cpr to dsk tool for the nocart conversions.

Now that would be cool :-)

tjohnson

Is it possible to run the cartridge games via disc rather than having to try to find the original carts and paying silly money people ask for them  or one of the emulator carts like c4cpc.  Obviously I'm thinking the cpc+ range here.

Sent from my E5823 using Tapatalk


arnoldemu

Quote from: tjohnson on 12:30, 12 June 17
Is it possible to run the cartridge games via disc rather than having to try to find the original carts and paying silly money people ask for them  or one of the emulator carts like c4cpc.  Obviously I'm thinking the cpc+ range here.

It may be possible with some, but each would have to be done on a case by case basis, and would probably need 128KB or have pauses for loading during play.

On c64, a lot of the carts were treated as mass read-only storage, reading data into ram quickly. On Plus, you can page bits of the rom in and out, so it's more like a big rom expansion. So depending on how the cart is used, it may be possible to move some into ram and patch the code to use it.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Retroash

Quote from: arnoldemu on 09:15, 09 June 17
I am now tempted to convert arnold to work on android...
and also to make a cpr to dsk tool for the nocart conversions.

Hello there, any progress on this? Both suggestions would be awesome if possible :-)

arnoldemu

Quote from: Retroash on 13:34, 15 June 17
Hello there, any progress on this? Both suggestions would be awesome if possible :-)
Yes. I already started a port of arnold to android. :)

I have the display working and it autoboots into 1 game. I am currently working on the code to handle touch and gamepad input so I can play the game.
There is also no UI currently. UI will be next so that you can choose to play other games.
I'll post a preview when I have something useable ready.

I haven't started on the tool yet.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Phantomz

Some of the games won't work when converted back from cart to disk due to how some of them have their keys remapped ( firmware hacks ).  :doh:

KaosOverride

#14
Quote from: tjohnson on 12:30, 12 June 17
Is it possible to run the cartridge games via disc rather than having to try to find the original carts and paying silly money people ask for them  or one of the emulator carts like c4cpc.  Obviously I'm thinking the cpc+ range here.

Sent from my E5823 using Tapatalk


Ohh, this is a real chalenge. Run any of the original GX games from disc. Many changes have to be made. And each game can be a unique case.


There are great devices like C4CPC but I think the M4 can be used also...


I was able to override the cart at boot time by using the lowfirmware option and the priority of M4 roms over internal ones (from the cart)


My theory is that if you setup the romboard start at 128 and replace the first 8 roms wirh the 8 blocks from the cart, and mirror the first block to slot 31 (for lowfirmware replace) you will have the cart run from M4 and use the cart ACID protection chip.


I will try to get some time for testing.


But the native CPR to DSK, is a pretty hacking exercise. Those games are designed to run and load data from ROM. You have to intercept any rom access and turn into AMSDOS loading from files. Maybe you have no free memory for AMSDOS...
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

dragon

The real problem is a dobut the fdd can handle that. I experiment with the burning rubber time ago when i made the s.o cartridge.




Burning rubber not copy each level to RAM and execute it, is much more complex. They have each page rom dedicated to diferent things.


When you are ingame all these pictures of the programmes, amstrad  etc etc are reading   from the cartridge at fly.. That mean that is the same in disc, i don't think the fdd can handle that in terms of speed.


At least for burning rubber.

andycadley


The most logical arrangement in a GX cartridge gives you an effective 96K address space, since you can use write through on ROM areas to do things like display changes and DMA lists where you don't need to read. Replicating that from disk just isn't possible and even something like the M4 won't cope if you use RMR2.


The best way to play cart games is definitely the C4CPC, it's unlikely to be worth the effort attempting to do anything else.

Duke

#17
With the current core handler in M4, plus games wont work as @andycadley pointed out, because RMR2 isn't implemented.
You can map the plus roms by moving the romboard start pos to 128 as @KaosOverride said, but they will only map to &C000, and not support the remapping of RMR2 and ROMDIS is obeyed.

However I did do a core handler which watches both RMR and RMR2, I got RMR working fine. RMR2 failed in first tries, I didn't really debug it, but I am not sure that ROMDIS is obeyed, so you conflict with the inserted card or maybe I just made another mistake.
Anyway, there's C4CPC which is great card for that purpose.

For the curious M4 only need to watch the gatearray access to RMR and RMR2, and look up the correct rom address mapping, which is further used in RD & MREQ

        ands        r2, r3, #0b11100000        @ keep 3 top bits
        cmp        r2, #0x80                @ is it RMR ?
        bne        not_rmr

        @ check if upper rom enabled/disabled
        tst        r3,#0b00001000
        ite        eq               
        moveq    r4, #0xFFFFFFFF
        movne    r4, #0   
        @ check if lower rom enabled/disabled
        tst        r3,#0b00000100
        ite         eq
        moveq    r5,r12
        movne    r5,#0
        b        mainloop
not_rmr:
        cmp        r2, #0xA0                @ is it RMR2 ?
        bne        mainloop
        ands        r2, r3, #7            @ 'physical' rom num
        add        r2, r9, r2, lsl #2
        ldr        r12, [r2, #0x200]
        @ get mapping
        add        r2, r2, #0b00001000
        and        r2, #0b00011000
        mov        r11,r2, lsl #11
        orr        r11, r11, #0x29
.....

Of course it gets a little long haired, but technically it could work out.
EDIT: and I just spotted a bug, maybe I will try it again.... r2,r3, :o

Duke

I revisted my "cpc plus" handler, corrected some bugs and indeed it is possible with M4:



Ok, it's not 100% as it doesn't watch for the asic unlock/lock sequence and sometimes fails to boot, maybe if I am bored sometime...  8)

Powered by SMFPacks Menu Editor Mod