This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LD SP,$fffe ; $0000 Setup Stack | |
XOR A ; $0003 Zero the memory from $8000-$9FFF (VRAM) | |
LD HL,$9fff ; $0004 | |
Addr_0007: | |
LD (HL-),A ; $0007 | |
BIT 7,H ; $0008 | |
JR NZ, Addr_0007 ; $000a | |
LD HL,$ff26 ; $000c Setup Audio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LD SP,$fffe ; $0000 Setup Stack | |
XOR A ; $0003 Zero the memory from $8000-$9FFF (VRAM) | |
LD HL,$9fff ; $0004 | |
Addr_0007: | |
LD (HL-),A ; $0007 | |
BIT 7,H ; $0008 | |
JR NZ, Addr_0007 ; $000a | |
LD HL,$ff26 ; $000c Setup Audio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; This is the code in Tetris which infinitely resets if you return 0 from the joypad register | |
Evil: ; CODE XREF: sub_20C+E9↓j | |
ROM:02C4 call pollJOYP ; stores inverted joypad state into 0xFF80 (upper nibble = dpad, low nibble = buttons) | |
ROM:02C7 call sub_2F8 | |
ROM:02CA call sub_7FF0 | |
ROM:02CD ld a, [$FF80] ; read the joypad state that pollJOYP previously cached | |
ROM:02CF and $F ; only keep the buttons, dump the dpad | |
ROM:02D1 cp $F ; see if all buttons are pressed | |
ROM:02D3 jp z, reset ; if yes reset lmfao |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; this is the caller function | |
BIOSCODE:BFC06EC4 # =============== S U B R O U T I N E ======================================= | |
BIOSCODE:BFC06EC4 | |
BIOSCODE:BFC06EC4 | |
BIOSCODE:BFC06EC4 sub_BFC06EC4: # CODE XREF: start+418↑j | |
BIOSCODE:BFC06EC4 | |
BIOSCODE:BFC06EC4 var_s0 = 0 | |
BIOSCODE:BFC06EC4 | |
BIOSCODE:BFC06EC4 addiu $sp, -0x18 | |
BIOSCODE:BFC06EC8 sw $ra, 0x14+var_s0($sp) ; back up $ra in stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void __noreturn sub_4003240() | |
{ | |
int v0; // r2 | |
int v1; // r0 | |
int i; // r0 | |
int v3; // r1 | |
int v4; // r2 | |
int v5; // r0 | |
int v6; // r0 | |
int v7; // r0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
__attribute__ ((naked)) void asm_main() { | |
__asm__ volatile (R"( | |
// x19: Pointer to file | |
// x20: Previous read number (or triplet for part 2) | |
// x21: number of increments | |
part1: | |
stp x19, x30, [sp, -16]! // save return address and x19, lower stack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
__attribute__ ((naked)) void asm_main() { | |
__asm__ volatile (R"( | |
// x19: Pointer to file | |
// x20: xpos | |
// x21: depth | |
// x22: aim | |
part1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
__attribute__ ((naked)) void asm_main() { | |
__asm__ volatile (R"( | |
// x19: Pointer to file | |
// x20: Bit cache (12 * 4 bytes of storage). Incremented on ones, decremented on zeroes. | |
// If the final result is > 0 then the most common value is 1, otherwise it's 0 | |
.equ NUM_BITS, 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Docking_Bullshit() | |
{ | |
bool v0; // zf | |
bool v1; // nf | |
int v2; // r1 | |
int v3; // r1 | |
int v4; // r1 | |
unsigned int v5; // r0 | |
unsigned int v6; // r0 | |
int v7; // r2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.10) | |
set(CMAKE_CXX_STANDARD 20) | |
set(CMAKE_CXX_STANDARD_REQUIRED True) | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fbracket-depth=4096") | |
if(NOT CMAKE_BUILD_TYPE) | |
set(CMAKE_BUILD_TYPE Release) | |
endif() | |
project(Alber) |
OlderNewer