Author Topic: ROM to DSK  (Read 334 times)

0 Members and 1 Guest are viewing this topic.

Offline kolleykibber

  • CPC464
  • **
  • Posts: 38
  • Country: gb
  • Liked: 31
  • Likes Given: 27
ROM to DSK
« on: 16:49, 19 April 21 »
I was wondering if there's anything out there that will take a rom and convert it so it loads from disk? Can't find anything out there. Or is the only way via a disassembler and time?


Offline ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.051
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 2195
  • Likes Given: 4363
Re: ROM to DSK
« Reply #1 on: 18:02, 19 April 21 »
The program below will dump a ROM image to disc, normally then for the image to be blown onto another ROM or examined , but as for Running the image from disc I don't think that's possible.


https://www.cpc-power.com/index.php?page=detail&num=12575
« Last Edit: 18:04, 19 April 21 by ComSoft6128 »

Offline GeoffB17

  • 6128 Plus
  • ******
  • Posts: 788
  • Country: gb
  • PCW since '85, more CP/M than Loco
  • Liked: 169
  • Likes Given: 9
Re: ROM to DSK
« Reply #2 on: 20:39, 19 April 21 »
Well, the original question said 'loads from disk'.

You would need a block of memory, specifically RAM, that had the same addresses as the original ROM would have had.  You would need software that would read the file of the ROM data from the disk, and write it to the new RAM, so that everything was at the same address that it would have been at on the ROM.  Then execute the prog starting at the original start address, which might not be the start address of the memory block.

Otherwise, you might try to create a program that 'emulated' the original machine and stepped through the ROM data directly from the disk file, making any jumps as required.  Possible, as it may not be too far from what emulators do anyway, but complicated.

Geoff

Offline Animalgril987

  • Supporter
  • CPC664
  • *
  • Posts: 143
  • Country: gb
  • Liked: 64
  • Likes Given: 151
Re: ROM to DSK
« Reply #3 on: 23:35, 19 April 21 »
Not just jumps, but calls and instructions of the form:


  LD register, ( address in ROM address range)

Offline kolleykibber

  • CPC464
  • **
  • Posts: 38
  • Country: gb
  • Liked: 31
  • Likes Given: 27
Re: ROM to DSK
« Reply #4 on: 03:15, 20 April 21 »
Thanks for the replies!


So if you were to disassemble a Rom file from &c000 and then move it to &4000 by changing all calls within the address range of the rom so they are relative to &4000.
Covering all things like far_calls. Would you be able to call &4000? Would you need to remove the ROM header?












Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.506
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1193
  • Likes Given: 2820
Re: ROM to DSK
« Reply #5 on: 16:36, 20 April 21 »
No, ROMs usually have a special header. Most ROM software has their DISC software pendandant, just use the disc version.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.05.02)