How hard would it be to hack these racers?
Re: How hard would it be to hack these racers?
Found this useful poke: 39204,0 (stops timer).
Perhaps this could help to improve performance a little.
Perhaps this could help to improve performance a little.
- ParadigmShifter
- Manic Miner
- Posts: 765
- Joined: Sat Sep 09, 2023 4:55 am
Re: How hard would it be to hack these racers?
I doubt it, it's just counting the number of times it has redrawn the screen sounds like (every 10 times = 1 second of Out Run time, as others mentioned it is variable though since it doesn't often draw at 10fps).
All that's involved there is incrementing a counter (will probably be a 16 bit counter. Might be 24 bits I suppose).
You could post the code where you hacked Space to be the M key but it didn't work properly, that is probably easy to fix.
All that's involved there is incrementing a counter (will probably be a 16 bit counter. Might be 24 bits I suppose).
You could post the code where you hacked Space to be the M key but it didn't work properly, that is probably easy to fix.
Re: How hard would it be to hack these racers?
Still, when demo mode kicks in, the absence of the timer and the engine sound seem to make the game work faster.ParadigmShifter wrote: ↑Thu Mar 14, 2024 11:40 pm I doubt it, it's just counting the number of times it has redrawn the screen sounds like (every 10 times = 1 second of Out Run time, as others mentioned it is variable though since it doesn't often draw at 10fps).
All that's involved there is incrementing a counter (will probably be a 16 bit counter. Might be 24 bits I suppose).
You could post the code where you hacked Space to be the M key but it didn't work properly, that is probably easy to fix.
Sure! Poke 32127,1 sets Space instead of M key but it reverts to M if controls are changed to somethinhg else and to keyboard back again. It seems to me somewhere in the code there is a table (?)/database (?) storing all those preset AND values used for Cursor, Sinclair and Keyboard keys.
Edit: I wonder if what's going on at addresses 31879~31885 relates to this somehow?
Re: How hard would it be to hack these racers?
You asked me for the code and I read poke...ParadigmShifter wrote: ↑Thu Mar 14, 2024 11:40 pm
You could post the code where you hacked Space to be the M key but it didn't work properly, that is probably easy to fix.
Anyway, it's this here:
- ParadigmShifter
- Manic Miner
- Posts: 765
- Joined: Sat Sep 09, 2023 4:55 am
Re: How hard would it be to hack these racers?
Do those AND's get changed when it resets then? In which case they are probably self modified to write the values from the control type (keyboard/joystick) when the game starts again from the menu? If that is the case you need to find where those values get written to those addresses. You can probably search through for the addresses that get modified, so that would be 32127 there.
Re: How hard would it be to hack these racers?
Yes, I think that's what happens.ParadigmShifter wrote: ↑Fri Mar 15, 2024 8:40 pm Do those AND's get changed when it resets then? In which case they are probably self modified to write the values from the control type (keyboard/joystick) when the game starts again from the menu?
If I don't return to control selection then that's fine but once I do, it resets back to default values.
- ParadigmShifter
- Manic Miner
- Posts: 765
- Joined: Sat Sep 09, 2023 4:55 am
Re: How hard would it be to hack these racers?
So you need to find where that happens in the code then. The addresses it looks like it modifies aren't contiguous so they probably overwrite them one at a time? Another possibility if the addresses modified are all a set number of bytes apart it may do it in a loop so maybe look at the address of the operand of the first AND instruction which would be 32087.
I don't think you can do a break on data write with Spin which is a shame, would be easy to find then.
I don't know if you can dump the disassembly as a text file and search through that for the numbers you are interested in though.
Look for either
LD (32127), A
or anywhere that HL gets set to 32127 (or 32087).
It may modify some bytes around the addresses as well first so you may have to look for writes to addresses within that function. But try looking for easy stuff first.
I don't think you can do a break on data write with Spin which is a shame, would be easy to find then.
I don't know if you can dump the disassembly as a text file and search through that for the numbers you are interested in though.
Look for either
LD (32127), A
or anywhere that HL gets set to 32127 (or 32087).
It may modify some bytes around the addresses as well first so you may have to look for writes to addresses within that function. But try looking for easy stuff first.
- ParadigmShifter
- Manic Miner
- Posts: 765
- Joined: Sat Sep 09, 2023 4:55 am
Re: How hard would it be to hack these racers?
I dunno. It's reading the keyboard directly in the routine you posted earlier so it doesn't use the ASCII representation or anything. Maybe it prints the keys out somewhere? Sounds like you can't redefine the keys so it won't be the defaults.
Re: How hard would it be to hack these racers?
Hey, I think I have found it!
I selected the memory view tab of the debugger and suddenly some sequences of numbers started making some sense to me...
Let's see if I change the 4's to 1's what happens to keys.
Yup, Poke 31895,1 sets Space instead of M permanently.
Beginner's luck and your help made it!
I selected the memory view tab of the debugger and suddenly some sequences of numbers started making some sense to me...
Let's see if I change the 4's to 1's what happens to keys.
Yup, Poke 31895,1 sets Space instead of M permanently.
Beginner's luck and your help made it!
- ParadigmShifter
- Manic Miner
- Posts: 765
- Joined: Sat Sep 09, 2023 4:55 am
Re: How hard would it be to hack these racers?
Yeah there would be colour clash.
It looks like it never draws any attribs either so that would make the drawing a bit slower. Maybe it draws some attribs if you go up and down hills though, but the ink colour is the same for everything looks like.
It looks like it never draws any attribs either so that would make the drawing a bit slower. Maybe it draws some attribs if you go up and down hills though, but the ink colour is the same for everything looks like.