|
Post by Pinacolada on May 14, 2007 16:06:04 GMT -5
Is there any sort of tool which will relocate ML code? I'd like to make a jump table of routines I use in my game and have code in one chunk of memory ($C000 for now). I realize I could go through and adjust addresses by hand (maybe I ought to, just to get practice at it; both regions I want to relocate aren't very large)... But it's good to know about tools and resources; so if anyone has info about or a link to such a thing, please let me know. Thanks.
|
|
|
Post by Leif Bloomquist on May 15, 2007 8:33:14 GMT -5
Some ML monitors have a relocate function, i.e. the one in the Epyx Fastload ("Q" command) . It moves code and changes any JMPs etc within the code to correspond with the new location. You'd still want to check it over and possibly make some corrections, but it should do the bulk of the work for you.
|
|
|
Post by Robin Harbron on May 15, 2007 8:42:24 GMT -5
(edit: oops, Leif beat me to it) I thought the ML monitor in SuperSnapshot could do this, but if so, it's not documented in the manual. MagerValp suggested the monitor built into the FastLoad cart: members.aol.com/fyarra001/hardware/epyxflc.htmHe also mentioned JamaicaMON (SuperCPU only) and that reminded me that it was the original SuperMON where I first saw code relocation. This is from the jammon docs, but it's probably the same in SuperMON:
|
|
|
Post by Pinacolada on May 15, 2007 15:11:25 GMT -5
I don't have any of that stuff besides an Epyx Fastload cartridge (I never knew there was a monitor in it). I guess I could try out an emulated SuperSnapshot though. Thanks. I'll try it and get back to you.
|
|
|
Post by Robin Harbron on May 15, 2007 15:59:12 GMT -5
I don't have any of that stuff besides an Epyx Fastload cartridge (I never knew there was a monitor in it). Well, that's all you need And SuperMON should be easy enough to download from somewhere? No point, as far as I can tell, the SuperSnapshot monitor, as great as it is, doesn't do code relocation.
|
|
|
Post by tlr on May 16, 2007 2:53:59 GMT -5
Hesmon, CCSmon and dtvmon all do relocation. (with the 'N' new locate command)
|
|
vbr
New Member
Posts: 1
|
Post by vbr on May 22, 2007 1:35:16 GMT -5
The venerable Commodore monitor (from the 'macro assembler development system') has a relocate command. Never found a use for it, though. Maybe if somebody is programming without using an assembler...
|
|
|
Post by Pinacolada on May 22, 2007 12:43:25 GMT -5
Robin: I have a disk of Jim Butterfield's programs, and it includes several versions of SuperMON. Going through the instructions I don't see anything about code relocation, though.
I think I will try the Fastload cartridge first. I wonder about the offset parameter though, I'll play with that.
I'm thinking of reserving 30 bytes for 10 JMP addresses for the jump table, that ought to get me by.
nikoniko's INSTRing routine is certainly smaller than my attempt; I'll try to use that and let everyone know how it works...
Oh, and the "diskin" routine is good at grabbing binary data out of my player log. It's basically Jim Butterfield's "Input Any" routine, with the channel and byte count parameters reversed.
|
|
|
Post by green64eagle on May 28, 2007 7:28:11 GMT -5
Howdy, I use the Micromon MLM from MAE 64 and it uses a New Locator: Quote "
.N 7000 7FFF 6000 0400 9000 .N 77CD 77FF 6000 0400 9000 W
Relocate a machine language program to a new address. The first line fixes all three byte instructions in the range of 7000 HEX to 77FF HEX by adding 6000 HEX offset to the bytes following the instruction. New located will not adjust any instruction outside of the 0400 to 9000 HEX range. The second line adjusts .WORD values in the same range as the first line. New locator will stop and disassemble any bad opcodes." End Quote
I have the Epyx Fastload cartridge, but I don't like its' MLM. Later, Tony
|
|