Author Topic: How to edit a .DSK (or ROM?)  (Read 1637 times)

0 Members and 1 Guest are viewing this topic.

Offline and155

  • CPC464
  • **
  • Posts: 7
  • Country: gb
  • Liked: 0
  • Likes Given: 1
How to edit a .DSK (or ROM?)
« on: 17:52, 23 October 20 »
Hi there,
I have found some 'Pokes' for one of my favourite games, which I still can't complete. I have the game as a .DSK file which when I open in notepad looks like nonsense.
Does anyone know how best to open and edit this type of format? I.e. is there a program I can use to do this? If not in .DSK format, what format should I obtain the game in and then edit - again with editing software to use?
The pokes I have found are:


















Temps = time, Force = Strength/Health and Balles = Bullets. These are all for Dr. Scrimes Spook School.
Thanks in advance for your help
Andy


Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.693
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1266
  • Likes Given: 2961
Re: How to edit a .DSK (or ROM?)
« Reply #1 on: 17:58, 23 October 20 »
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline and155

  • CPC464
  • **
  • Posts: 7
  • Country: gb
  • Liked: 0
  • Likes Given: 1
Re: How to edit a .DSK (or ROM?)
« Reply #2 on: 19:07, 23 October 20 »
Thanks for sending this through. I appreciate that this may be simple for you experts, but I have no idea what I'm doing!
I found within Winape that there is a 'Pokes' section. I am guessing I need to find the code and amend the data?

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 797
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: How to edit a .DSK (or ROM?)
« Reply #3 on: 19:32, 23 October 20 »
Hello,

Yes, this is somewhat of an arcane art, but once you get the hang of it, and have the correct tools, then it's OK.

I'd expect that 'pokes' might be given as a byte offset within a specified file, i.e. byte 20 should be changed from 68 to 6F.   So you have a program that displays the file as hex bytes such as 1F 2B AA 68 etc, and allows you to select a specific byte and change it, and then save the whole file back to disk or memory.

In your message, you did not show the actual poke details.   The details you did show are merely translations of French words to English?

Literal pokes can be done using BASIC, you need to have the file to be changed in memory, so POKE <address>, <data> will change the byte <address> from whatever it was to <data>.   The file needs to be loaded at the correct place (re memory addresses) as well.  You cannot use literal pokes on a .DSK file, as nothing is in the correct place.

Editing the .DSK would just add some extra calculating to make sure you're using the correct bit of the image that represents the right bit of the file, and then literally changing the file data

Doing something like this, always a good idea to make a copy of the file and edit that, then if things get messed up you've got the original to go back to.

Oh, in case you wonder, you cannot edit a ROM.  It's Read Only Memory!

????  When I first looked at your message, there was just a blank space between your text, and the note regarding the translations.  hence the comment about 'No actual pokes'.   After writing all the above, I've looked again at your original message, and NOW the actual pokes are there, showing as reverse video (white on Blue).   These are certainly BASIC pokes, although it would be a help if the information showed the current data at the address so you could confirm you are poking the correct spot.   I'd assume that the pokes are given assuming the code to be changed is at the normal place.  It might be possible to use that data to change (patch) the data in the .DSK image, but this may be a lot more complicated depending on what files/code is in the image, and how it's loaded into memory

Geoff
« Last Edit: 22:01, 23 October 20 by GeoffB17 »

Offline Johnny Olsen

  • Supporter
  • 464 Plus
  • *
  • Posts: 309
  • Country: dk
  • Liked: 237
  • Likes Given: 476
Re: How to edit a .DSK (or ROM?)
« Reply #4 on: 12:07, 24 October 20 »
I have found some 'Pokes' for one of my favourite games, which I still can't complete. I have the game as a .DSK file which when I open in notepad looks like nonsense.

No need to mess with dsk image, Nich has already made a dsk with the poke you need.
Follow Gunhed's link, scroll down and press the black crack dsk.
Download
"Dr Scrime's Spook School (UK) (1987) (Trainer) .dsk"

Offline genesis8

  • CPC6128
  • ****
  • Posts: 254
  • Country: fr
    • Genesis8 Amstrad Page
  • Liked: 95
  • Likes Given: 67
Re: How to edit a .DSK (or ROM?)
« Reply #5 on: 17:03, 24 October 20 »
____________
Amstrad news site at Genesis8 Amstrad Page

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.911
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4030
  • Likes Given: 7254
Re: How to edit a .DSK (or ROM?)
« Reply #6 on: 09:59, 26 October 20 »
When I first looked at your message, there was just a blank space between your text, and the note regarding the translations. hence the comment about 'No actual pokes'. After writing all the above, I've looked again at your original message, and NOW the actual pokes are there, showing as reverse video (white on Blue). These are certainly BASIC pokes, although it would be a help if the information showed the current data at the address so you could confirm you are poking the correct spot. I'd assume that the pokes are given assuming the code to be changed is at the normal place. It might be possible to use that data to change (patch) the data in the .DSK image, but this may be a lot more complicated depending on what files/code is in the image, and how it's loaded into memory

What on earth?!?! Same with me, first load nothing appeared, refreshing the page showed the pokes as if they were screen-shot from an emulator (see attachment). Even weirder if I edit the post I can move the individual characters about! No idea how this is possible :D  Is there an emulator that allows you to copy text from the screen as bitmaps or something?

Offline and155

  • CPC464
  • **
  • Posts: 7
  • Country: gb
  • Liked: 0
  • Likes Given: 1
Re: How to edit a .DSK (or ROM?)
« Reply #7 on: 14:15, 26 October 20 »
No need to mess with dsk image, Nich has already made a dsk with the poke you need.
Follow Gunhed's link, scroll down and press the black crack dsk.
Download
"Dr Scrime's Spook School (UK) (1987) (Trainer) .dsk"
Great! Thanks for all your help! I got this working this morning :)
« Last Edit: 14:31, 26 October 20 by and155 »

Offline Nich

  • Supporter
  • 6128 Plus
  • *
  • Posts: 791
  • Country: gb
  • CPC Game Reviews webmaster
    • CPC Game Reviews
  • Liked: 714
  • Likes Given: 846
Re: How to edit a .DSK (or ROM?)
« Reply #8 on: 20:54, 26 October 20 »
Hi there,
I have found some 'Pokes' for one of my favourite games, which I still can't complete. I have the game as a .DSK file which when I open in notepad looks like nonsense.
Does anyone know how best to open and edit this type of format? I.e. is there a program I can use to do this? If not in .DSK format, what format should I obtain the game in and then edit - again with editing software to use?

I posted an explanation in another thread of how to enter pokes in WinAPE using its debugger, but here it is again:

Press F7 while the game is playing. Click on the section of the window with the long lines of hex values and random characters.

Now either press Ctrl+G or click on the icon with the pointing hand. You will be asked which address in memory to go to.

Enter the 4-digit hex value (e.g. 7F66), and the cursor should move to that address. Now type the 2-digit hex value you wish to poke into that address (e.g. 21).

Repeat this procedure until you have poked all the addresses you need. :) You can also scroll through the lines of hex values and search for the relevant memory addresses.

WinAPE also has a poke database which you can access by pressing Ctrl+F8, but I've never used it!

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.911
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4030
  • Likes Given: 7254
Re: How to edit a .DSK (or ROM?)
« Reply #9 on: 09:27, 27 October 20 »
Keep forgetting about the poke db... damn :D