Skip to content

Commit

Permalink
Bump the video output one line up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisotura committed Dec 9, 2014
1 parent 7366aa0 commit e25cd2e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 48 deletions.
4 changes: 2 additions & 2 deletions source/cpu.s
Original file line number Diff line number Diff line change
Expand Up @@ -4176,8 +4176,8 @@ OP_e0_TCS:
OP_e1_TCS:
mov snesS, snesS, lsl #0x10
mov snesS, snesS, lsr #0x10
and r4, snesA, #0xFF
orr snesS, snesS, r4, lsl #0x10
and r0, snesA, #0xFF
orr snesS, snesS, r0, lsl #0x10
orr snesS, snesS, #0x01000000
AddCycles 1
b op_return
Expand Down
57 changes: 13 additions & 44 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,21 +239,21 @@ float vertexList[] =
0.0, 400.0, 0.9, 0.0, 0.0625,

// screen
8.0, 72.0, 0.9, 1.0, 0.875,
232.0, 72.0, 0.9, 1.0, 0.0,
232.0, 328.0, 0.9, 0.0, 0.0,
8.0, 72.0, 0.9, 1.0, 0.87890625,
232.0, 72.0, 0.9, 1.0, 0.00390625,
232.0, 328.0, 0.9, 0.0, 0.00390625,

8.0, 72.0, 0.9, 1.0, 0.875,
232.0, 328.0, 0.9, 0.0, 0.0,
8.0, 328.0, 0.9, 0.0, 0.875,
8.0, 72.0, 0.9, 1.0, 0.87890625,
232.0, 328.0, 0.9, 0.0, 0.00390625,
8.0, 328.0, 0.9, 0.0, 0.87890625,
};
float* borderVertices;
float* screenVertices;


void ApplyScaling()
{
float texy = (float)SNES_Status->ScreenHeight / 256.0f;
float texy = (float)(SNES_Status->ScreenHeight+1) / 256.0f;

float x1, x2, y1, y2;

Expand Down Expand Up @@ -732,49 +732,15 @@ void reportshit(u32 pc, u32 a, u32 y)
bprintf("%06X A=%04X %04X\n", pc, a, *(u32*)&SNES_SysRAM[0x300]);
}
oldshiz = *(u32*)&SNES_SysRAM[0x300];*/
bprintf("!! IRQ %04X %02X\n", SNES_Status->IRQ_CurHMatch, SNES_Status->IRQCond);
//bprintf("!! IRQ %04X %02X\n", SNES_Status->IRQ_CurHMatch, SNES_Status->IRQCond);
//pause=1;
return;



if (reported) return;
reported = 1;
bprintf("o_O %04X %02X %02X %02X %02X\n", pc, SPC_IOPorts[0], SPC_IOPorts[1], SPC_IOPorts[2], SPC_IOPorts[3]);
bprintf("-> %02X %02X %02X %02X\n", SPC_IOPorts[4], SPC_IOPorts[5], SPC_IOPorts[6], SPC_IOPorts[7]);
// 49B4 49B5
bprintf("%02X %02X | %02X %02X | %04X\n", SPC_RAM[0x49B4], SPC_RAM[0x49B5], SPC_RAM[0x49B7], SPC_RAM[0x49B8], a);
/*bprintf("-- %06X\n", pc);
bprintf("--- %04X %04X\n", *(u16*)&SNES_SysRAM[0x1E5A], *(u16*)&SNES_SysRAM[0x1E5E]);
bprintf("--- %04X %04X\n", *(u16*)&SNES_SysRAM[0x6], *(u16*)&SNES_SysRAM[0xA]);
dbg_save("/snesram_earthbound.bin", SNES_SysRAM, 128*1024);*/
//reported=pc;

// C500A3

/*u32 derpo = pc;
if (framecount >= 51)
{
dbg_save("/derp.bin", &derpo, 4);
}*/
bprintf("TSX S=%04X X=%04X P=%04X %04X\n", pc>>16, a, y&0xFFFF, y>>16);
}

int reported2=0;
void reportshit2(u32 pc, u32 a, u32 y)
{
bprintf("JSR %06X -> %04X\n", a, pc);
return;




if (reported2) return;
reported2 = 1;
bprintf(">_< %04X %02X %02X %02X %02X\n", pc, SPC_IOPorts[0], SPC_IOPorts[1], SPC_IOPorts[2], SPC_IOPorts[3]);
bprintf("-> %02X %02X %02X %02X\n", SPC_IOPorts[4], SPC_IOPorts[5], SPC_IOPorts[6], SPC_IOPorts[7]);
// 49B4 49B5
bprintf("%02X %02X | %02X %02X | %04X\n", SPC_RAM[0x49B4], SPC_RAM[0x49B5], SPC_RAM[0x49B7], SPC_RAM[0x49B8], a);
bprintf("TSC S=%04X A=%04X P=%04X %04X\n", pc>>16, a, y&0xFFFF, y>>16);
}


Expand Down Expand Up @@ -943,6 +909,9 @@ int main()
bprintf("PC: CPU %02X:%04X SPC %04X\n", CPU_Regs.PBR, CPU_Regs.PC, SPC_Regs.PC);
dbg_save("/snesram.bin", SNES_SysRAM, 128*1024);
dbg_save("/spcram.bin", SPC_RAM, 64*1024);
dbg_save("/vram.bin", PPU.VRAM, 64*1024);
dbg_save("/oam.bin", PPU.OAM, 0x220);
dbg_save("/cgram.bin", PPU.CGRAM, 512);
}

if ((held & (KEY_L|KEY_R)) == (KEY_L|KEY_R))
Expand Down
2 changes: 0 additions & 2 deletions source/ppu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,6 @@ void PPU_ComputeWindows(PPU_WindowSegment* s)

void PPU_RenderScanline(u32 line)
{
if (line >= SNES_Status->ScreenHeight) return;

if (!(line & 7))
ContinueRendering();

Expand Down

0 comments on commit e25cd2e

Please sign in to comment.