1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 17:00:19 +00:00

Rename and move handwritten asm files (#1254)

* Rename handwritten asm files and move them to src

* Fix progress.py

* Remove handling for asm dir from Makefile
This commit is contained in:
Tharo 2022-06-03 21:33:18 +01:00 committed by GitHub
parent e989cb7ace
commit 4775fd4a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
39 changed files with 47 additions and 59 deletions

34
src/makerom/entry.s Normal file
View file

@ -0,0 +1,34 @@
#include "ultra64/asm.h"
#include "boot.h"
.set noreorder
.section .text
.balign 16
LEAF(entrypoint)
// Clear boot segment .bss
la $t0, _bootSegmentBssStart
#ifndef AVOID_UB
// UB: li only loads the lower 16 bits of _bootSegmentBssSize when it may be larger than this,
// so not all of bss may be cleared if it is too large
li $t1, _bootSegmentBssSize
#else
la $t1, _bootSegmentBssSize
#endif
.clear_bss:
addi $t1, $t1, -8
sw $zero, ($t0)
sw $zero, 4($t0)
bnez $t1, .clear_bss
addi $t0, $t0, 8
// Set up stack and enter program code
lui $t2, %hi(bootproc)
lui $sp, %hi(sBootThreadStack + BOOT_STACK_SIZE)
addiu $t2, %lo(bootproc)
jr $t2
addiu $sp, %lo(sBootThreadStack + BOOT_STACK_SIZE)
END(entrypoint)
.fill 0x60 - (. - entrypoint)

4
src/makerom/ipl3.s Normal file
View file

@ -0,0 +1,4 @@
.section .text
.incbin "baserom.z64", 0x40, 0xFC0

18
src/makerom/rom_header.s Normal file
View file

@ -0,0 +1,18 @@
/*
* The Legend of Zelda: Ocarina of Time ROM header
*/
.byte 0x80, 0x37, 0x12, 0x40 /* PI BSD Domain 1 register */
.word 0x0000000F /* Clockrate setting */
.word 0x80000400 /* Entrypoint function (`entrypoint`) */
.word 0x0000144C /* Revision */
.word 0x917D18F6 /* Checksum 1 */
.word 0x69BC5453 /* Checksum 2 */
.word 0x00000000 /* Unknown */
.word 0x00000000 /* Unknown */
.ascii "THE LEGEND OF ZELDA " /* Internal ROM name */
.word 0x00000000 /* Unknown */
.word 0x0000004E /* Cartridge */
.ascii "ZL" /* Cartridge ID */
.ascii "P" /* Region */
.byte 0x0F /* Version */