Need Help Understanding Some Plugin Code and ROM Addressing

csmccarron

#1 ◈ 2025-01-14

Can some explain in pseudo code what this is doing?

What is stored in the array and what is it doing?

// Add Extended RPM
rom.byteAt(0x09F3) = 0x03;
rom.wordAt(0x09F4) = 0x7904;
_rom_fill(0x09F6, 0x0A00, 0xFF);
_rom_write(0x7904,
new Array(0xF9,0xEC,0x17,0x18,0xB5,0xAC,0x4A,0x44,
0x98,0x00,0xAA,0x90,0x37,0x53,0x79,0x43,
0xCE,0x08,0x53,0x78,0xCE,0x06,0x77,0x01,
0xCB,0x02,0x77,0xFF,0x8A,0x60,0x1E,0x70,
0xC3,0x59,0x4B,0x9E,0x12,0x03,0xA1,0x76),
0x28);

What is stored at ROM address 0x09F3, 0x09F4, & 0x09F6? Why are these addresses not documented on the WIKI or is there some conversion that has to take place?

If I wanted to change my VTEC cross over to 6000rpm is this the proper way to do it?

rom.write(0x6432) = 0xAA
rom.write(0x6433) = 0xAB

Thanks

bigwig

#2 ◈ 2025-01-14

Re: Need Help Understanding Some Plugin Code and ROM Address

csmccarron wrote:
Can some explain in pseudo code what this is doing?

What is stored in the array and what is it doing?

// Add Extended RPM
rom.byteAt(0x09F3) = 0x03; ***writes 0x03 byte at 09f3
rom.wordAt(0x09F4) = 0x7904; ***writes word 07904 at 09F4
***This is setting up a jump
_rom_fill(0x09F6, 0x0A00, 0xFF);***At 09f6 it is going to write FF's for 0A spots. So at 09f6 it will be FF. 09f7 it will be FF. and it will do this 0A times

_rom_write(0x7904,
new Array(0xF9,0xEC,0x17,0x18,0xB5,0xAC,0x4A,0x44,
0x98,0x00,0xAA,0x90,0x37,0x53,0x79,0x43,
0xCE,0x08,0x53,0x78,0xCE,0x06,0x77,0x01,
0xCB,0x02,0x77,0xFF,0x8A,0x60,0x1E,0x70,
0xC3,0x59,0x4B,0x9E,0x12,0x03,0xA1,0x76),
0x28);

****The Array function writes a series of bytes from a certain point. So starting at 7904 it will write all of those byes. The last hex address is how many bytes in total you are writing.

What is stored at ROM address 0x09F3, 0x09F4, & 0x09F6? Why are these addresses not documented on the WIKI or is there some conversion that has to take place?

I have no idea what this code is for. You'd have to tell us as I'm sure its pretty clearly commented in the script. Just from the looks of it, the code is for something to do with the rpm rows. Its essentially saying, hey, I moved the code, go to 7904 and see what I did up there.

If I wanted to change my VTEC cross over to 6000rpm is this the proper way to do it?

rom.write(0x6432) = 0xAA
rom.write(0x6433) = 0xAB

Thanks
[/i]

csmccarron

#3 ◈ 2025-01-14

Sorry, it is from the P30 RevTools plugin. So does the array contain data or is it rewritting the BIN program with new ASM code?

bigwig

#4 ◈ 2025-01-14

I'd assume that its ASM code. Crome doesn't have an assembler like Uberdata so you have to take all the ASM code, find out the actual bytes it writes, and then have crome write those said bytes.

blundar

#5 ◈ 2025-01-14

^^ what he said.
Do you have the Crome API documentation file? I'll see if it's posted anywhere and post it if need be.

csmccarron

#6 ◈ 2025-01-14

I have the crome api documentation file.

Thanks for the help.