-
Notifications
You must be signed in to change notification settings - Fork 4
Description
To compile the header and program correctly, the header needs to be placed after the "Prepare Application" section, and "Include Libraries" needs to be placed after the header. Both need to be placed before start. This is because as-is in the tutorial, the compiler will place the header at $200 first, then libperspective and its associated files, then go back to writing at the beginning of the VMS file, which will cause data to be overwritten.
Example:
;=======================;
;Beginners' VMU Tutorial;
; Lesson 1 ;
;=======================;
;=======================;
; Define Variables: ;
;=======================;
p3_pressed = $4 ; 1 Byte (For LibKCommon)
p3_last_input = $5 ; 1 Byte (For LibKCommon)
;=======================;
; Prepare Application ;
;=======================;
(prepare application code here)
goodbye:
not1 ext,0
jmpf goodbye
;=======================;
;VMU Application Header ;
;=======================;
.include "GameHeader.i"
;=======================;
; Include Libraries ;
;=======================;
.include "./lib/libperspective.asm"
.include "./lib/libkcommon.asm"
.include "./lib/sfr.i"
;=======================;
; Main Program ;
;=======================;
start: