Skip to content

Included files are in the wrong place in main.asm #3

@TheCBarpsh

Description

@TheCBarpsh

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:

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions