EvilJagaGenius / jagoombacolor

Jaga's Goomba Color fork
102 stars 9 forks source link

Unable to save novblankwait into a config #36

Open voloved opened 1 year ago

voloved commented 1 year ago

I cannot find the correct avenue to pose this question, so I'll ask here:

How can I save novblankwait into the config? I see that cfg->misc seems to have enough space for the 2 bits novblankwait needs, but I cannot find where I can set the default to what's in the config. Attempt 1: I tried testing and setting novblankwait = 2; at the end of readconfig Nothing changed.

        request_gb_type = (i & 0x0C)>>2;        //restore current request_gb_type setting
        autostate = (i & 0x10)>>4;              //restore current autostate setting
        gammavalue = (i & 0xE0)>>5;             //restore current gamma setting
        sram_owner=cfg->sram_checksum;
+       novblankwait = 2;;
    }
}

Attempt 2: I tried setting novblankwait to 2 as a default as a sanity check, but that did not cause the game to default to slomo (2 is slomo)

novblankwait:
-   .byte 0 @novblankwait_
+   .byte 1 @novblankwait_

Attempt 3: In timeout.s, I tried to make a function that calls vblset as a test. The idea is that at the 0th frame, we can read novblankwait in the config and set it. That somehow did nothing. Though I do not know if I'm missing something.

line0:
    adr_ r2,cpuregs
    stmia r2,{gb_flg-gb_pc,gb_sp}   @save gbz80 state

    ldrb_ r0,autoborderstate
    cmp r0,#1
    bne 0f
    ldr_ r0,frame
    ldr_ r1,auto_border_reboot_frame
    cmp r0,r1
    blt 0f
    bl_long loadcart_after_sgb_border
+   ldr r1,=vblset
+   bx r1
0: