Skip to content

Instantly share code, notes, and snippets.

@Dwedit
Dwedit / snes9x_DrawTile16AddS1_2_Normal1x1.asm
Created March 26, 2019 12:39
Snes9x DrawTile16AddS1_2_Normal1x1 disassembly
?DrawTile16AddS1_2_Normal1x1@@YAXIIII@Z PROC ; DrawTile16AddS1_2_Normal1x1, COMDAT
; 104981: {
mov QWORD PTR [rsp+16], rbx
mov QWORD PTR [rsp+24], rbp
mov QWORD PTR [rsp+32], rsi
push r12
push r14
push r15
@Dwedit
Dwedit / tile_i.cpp
Created March 26, 2019 12:38
Snes9x DrawTile16AddS1_2_Normal1x1 Expanded Code
static void DrawTile16AddS1_2_Normal1x1(uint32 Tile, uint32 Offset, uint32 StartLine, uint32 LineCount)
{
uint8 *pCache;
int32 l;
uint8 *bp, Pix;
uint32 TileNumber;
uint32 TileAddr = BG.TileAddress + ((Tile & 0x3ff) << BG.TileShift);
if (Tile & 0x100) TileAddr += BG.NameSelect;
TileAddr &= 0xffff;