This commit is contained in:
CrazyRedMachine 2024-06-05 20:44:27 +02:00
parent 3a57387e6a
commit a00cbd6daa

View File

@ -1149,9 +1149,9 @@ void save_recSPflags() {
recbinArray_writing[1].button = (uint8_t)~recbinArray_writing[0].button; recbinArray_writing[1].button = (uint8_t)~recbinArray_writing[0].button;
recbinArray_writing[1].flag = (uint8_t)~recbinArray_writing[0].flag; recbinArray_writing[1].flag = (uint8_t)~recbinArray_writing[0].flag;
uint16_t *button_no = *(uint16_t **)button_addr; uint16_t *button_no = *(uint16_t **)button_addr;
uint8_t bt00 = *button_no; uint8_t bt00 = *button_no;
uint32_t bt14 = 0; uint32_t bt14 = 0;
uint32_t bt58 = 0; uint32_t bt58 = 0;
uint32_t i = 0; uint32_t i = 0;
do do
@ -1171,8 +1171,8 @@ void save_recSPflags() {
printf("bt00(%02x) bt14(%08X) bt58(%08X)\n", bt00, bt14, bt58); printf("bt00(%02x) bt14(%08X) bt58(%08X)\n", bt00, bt14, bt58);
recbinArray_writing[1].pad[0] = bt00; recbinArray_writing[1].pad[0] = bt00;
recbinArray_writing[1].timing = bt14; recbinArray_writing[1].timing = bt14;
recbinArray_writing[1].recid = bt58; recbinArray_writing[1].recid = bt58;
/* .rec file format /* .rec file format
random,timing,gauge,guide_se,speed,(00),(00),bt_0-bt_8 random,timing,gauge,guide_se,speed,(00),(00),bt_0-bt_8
*/ */
@ -5015,11 +5015,11 @@ void rec_id_check() {
__asm("mov byte ptr [esi+0x60], cl\n"); // save long_judge __asm("mov byte ptr [esi+0x60], cl\n"); // save long_judge
__asm("id_match_end:\n"); __asm("id_match_end:\n");
__asm("cmp cl, 0\n"); __asm("cmp cl, 0\n");
__asm("setne al\n"); __asm("setne al\n");
__asm("rec_id_nomatch:\n"); __asm("rec_id_nomatch:\n");
__asm("pop ebp\n"); __asm("pop ebp\n");
__asm("pop ecx\n"); __asm("pop ecx\n");
} }
@ -5786,8 +5786,8 @@ void chart_rewrite() {
double mul = 0; double mul = 0;
double mul_2dx =0; double mul_2dx =0;
uint32_t i, size; uint32_t i, size;
struct CHART* chart_temp; struct CHART* chart_temp;
size = sizeof(struct CHART) * chart_rows_count; size = sizeof(struct CHART) * chart_rows_count;
chart_temp = (struct CHART*)malloc(size); chart_temp = (struct CHART*)malloc(size);
@ -5804,7 +5804,7 @@ void chart_rewrite() {
mul = (double)(100/((double)new_speed)); mul = (double)(100/((double)new_speed));
mul_2dx = (double)(((double)new_speed)/100); mul_2dx = (double)(((double)new_speed)/100);
for (i = 0; i < chart_rows_count; i++) { for (i = 0; i < chart_rows_count; i++) {
chart_temp[i].timestamp = (uint32_t)((double)chart_temp[i].timestamp*mul); chart_temp[i].timestamp = (uint32_t)((double)chart_temp[i].timestamp*mul);
if (chart_temp[i].duration > 0) { if (chart_temp[i].duration > 0) {
chart_temp[i].duration = (uint32_t)((double)chart_temp[i].duration*mul); chart_temp[i].duration = (uint32_t)((double)chart_temp[i].duration*mul);
@ -5828,11 +5828,11 @@ void chart_rewrite() {
LOG("popnhax: chart_temp_addr is 0x%p\n", chart_temp); LOG("popnhax: chart_temp_addr is 0x%p\n", chart_temp);
#endif #endif
free(chart_temp); free(chart_temp);
chart_speed_end: chart_speed_end:
use_sp_flag = true; use_sp_flag = true;
LOG("popnhax: chart speed change done.\n"); LOG("popnhax: chart speed change done.\n");
#if DEBUG == 1 #if DEBUG == 1
LOG("popnhax: chart mul is %f\n", mul); LOG("popnhax: chart mul is %f\n", mul);