This commit is contained in:
Donkey Kong 2024-11-03 19:36:50 -06:00
parent f5132b6a4a
commit 6c733e5cb4
5 changed files with 90 additions and 11 deletions

View File

@ -145,7 +145,7 @@ us,boot,__osInsertTimer,392,yes
us,boot,osAiSetFrequency,324,yes
us,boot,func_dk64_boot_800073D0,132,yes
us,boot,func_dk64_boot_800004B4,64,yes
us,boot,__osPackEepReadData,140,no
us,boot,__osPackEepReadData,140,yes
us,boot,osContInit,368,yes
us,boot,func_dk64_boot_80003120,192,no
us,boot,osViSetSpecialFeatures,440,yes
@ -191,7 +191,7 @@ us,boot,guOrthoF,340,yes
us,boot,__osSpSetPc,52,yes
us,boot,func_dk64_boot_80002DE4,180,no
us,boot,__ull_divremi,96,yes
us,boot,osEepromRead,452,no
us,boot,osEepromRead,452,yes
us,boot,__osEnqueueThread,72,yes
us,boot,__osPiGetAccess,68,yes
us,boot,__osPopThread,16,yes

1 version section function length matching
145 us boot osAiSetFrequency 324 yes
146 us boot func_dk64_boot_800073D0 132 yes
147 us boot func_dk64_boot_800004B4 64 yes
148 us boot __osPackEepReadData 140 no yes
149 us boot osContInit 368 yes
150 us boot func_dk64_boot_80003120 192 no
151 us boot osViSetSpecialFeatures 440 yes
191 us boot __osSpSetPc 52 yes
192 us boot func_dk64_boot_80002DE4 180 no
193 us boot __ull_divremi 96 yes
194 us boot osEepromRead 452 no yes
195 us boot __osEnqueueThread 72 yes
196 us boot __osPiGetAccess 68 yes
197 us boot __osPopThread 16 yes

View File

@ -4420,7 +4420,7 @@ us,boot,__osInsertTimer,392,yes
us,boot,osAiSetFrequency,324,yes
us,boot,func_dk64_boot_800073D0,132,yes
us,boot,func_dk64_boot_800004B4,64,yes
us,boot,__osPackEepReadData,140,no
us,boot,__osPackEepReadData,140,yes
us,boot,osContInit,368,yes
us,boot,func_dk64_boot_80003120,192,no
us,boot,osViSetSpecialFeatures,440,yes
@ -4466,7 +4466,7 @@ us,boot,guOrthoF,340,yes
us,boot,__osSpSetPc,52,yes
us,boot,func_dk64_boot_80002DE4,180,no
us,boot,__ull_divremi,96,yes
us,boot,osEepromRead,452,no
us,boot,osEepromRead,452,yes
us,boot,__osEnqueueThread,72,yes
us,boot,__osPiGetAccess,68,yes
us,boot,__osPopThread,16,yes

1 version section function length matching
4420 us boot osAiSetFrequency 324 yes
4421 us boot func_dk64_boot_800073D0 132 yes
4422 us boot func_dk64_boot_800004B4 64 yes
4423 us boot __osPackEepReadData 140 no yes
4424 us boot osContInit 368 yes
4425 us boot func_dk64_boot_80003120 192 no
4426 us boot osViSetSpecialFeatures 440 yes
4466 us boot __osSpSetPc 52 yes
4467 us boot func_dk64_boot_80002DE4 180 no
4468 us boot __ull_divremi 96 yes
4469 us boot osEepromRead 452 no yes
4470 us boot __osEnqueueThread 72 yes
4471 us boot __osPiGetAccess 68 yes
4472 us boot __osPopThread 16 yes

View File

@ -9,7 +9,7 @@
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h71v20H0z"/>
<path fill="#92c000" d="M71 0h67v20H71z"/>
<path fill="#8ec000" d="M71 0h67v20H71z"/>
<path fill="url(#b)" d="M0 0h138v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
@ -17,7 +17,7 @@
<text x="35.5" y="14">dk64_boot</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="105.5" y="15" fill="#010101" fill-opacity=".3">62.0421%</text>
<text x="104.5" y="14">62.0421%</text>
<text x="105.5" y="15" fill="#010101" fill-opacity=".3">63.1093%</text>
<text x="104.5" y="14">63.1093%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -17,7 +17,7 @@
<text x="66.0" y="14">Donkey Kong 64 (US)</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">41.4867%</text>
<text x="165.5" y="14">41.4867%</text>
<text x="166.5" y="15" fill="#010101" fill-opacity=".3">41.5226%</text>
<text x="165.5" y="14">41.5226%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,8 +1,87 @@
#include <ultra64.h>
#include "functions.h"
#include "controller.h"
void __osSiGetAccess();
s32 __osSiRawStartDma(s32, void *);
void __osSiRelAccess(void);
extern OSPifRam __osEepPifRam;
void __osPackEepReadData(u8);
s32 osEepromRead(OSMesgQueue *mq, u8 address, u8 *buffer) {
s32 ret;
s32 i;
u16 type;
u8 *ptr;
OSContStatus sdata;
__OSContEepromFormat eepromformat;
#pragma GLOBAL_ASM("asm/nonmatchings/dk64_boot/io/conteepread/osEepromRead.s")
ret = 0;
i = 0;
ptr = (u8*)&__osEepPifRam;
__osSiGetAccess();
ret = __osEepStatus(mq, &sdata);
if (!ret) {
type = sdata.type & (CONT_EEPROM | CONT_EEP16K);
switch (type) {
case CONT_EEPROM:
if (address >= EEPROM_MAXBLOCKS) {
ret = -1;
}
break;
case CONT_EEPROM | CONT_EEP16K:
if (address >= EEP16K_MAXBLOCKS) {
ret = -1;
}
break;
default:
ret = 8;
}
}
if (ret) {
__osSiRelAccess();
return ret;
}
while (sdata.status & CONT_EEPROM_BUSY) {
__osEepStatus(mq, &sdata);
}
__osPackEepReadData(address);
__osSiRawStartDma(1, &__osEepPifRam);
osRecvMesg(mq, NULL, 1);
__osSiRawStartDma(0, &__osEepPifRam);
__osContLastCmd = 4;
osRecvMesg(mq, NULL, 1);
#pragma GLOBAL_ASM("asm/nonmatchings/dk64_boot/io/conteepread/__osPackEepReadData.s")
for (i = 0; i < MAXCONTROLLERS; i++) {
ptr++;
}
eepromformat = *(__OSContEepromFormat *)ptr;
ret = CHNL_ERR(eepromformat);
if (ret == 0) {
for (i = 0; i < ARRLEN(eepromformat.data); i++) {
*buffer++ = eepromformat.data[i];
}
}
__osSiRelAccess();
return ret;
}
void __osPackEepReadData(u8 address) {
u8 *ptr;
__OSContEepromFormat eepromformat;
s32 i;
ptr = &__osEepPifRam.ramarray;
__osEepPifRam.pifstatus = CONT_CMD_EXE;
eepromformat.txsize = CONT_CMD_READ_EEPROM_TX;
eepromformat.rxsize = CONT_CMD_READ_EEPROM_RX;
eepromformat.cmd = CONT_CMD_READ_EEPROM;
eepromformat.address = address;
for (i = 0; i < 4; i++) {
*ptr++ = 0;
}
*(__OSContEepromFormat *)(ptr) = eepromformat;
ptr += sizeof(__OSContEepromFormat);
ptr[0] = CONT_CMD_END;
}