Skip to content

Attempt to fix .rom directive not suitable for 48kB ROM#94

Merged
Fubukimaru merged 1 commit into
Fubukimaru:masterfrom
duhow:issue-5
Oct 20, 2021
Merged

Attempt to fix .rom directive not suitable for 48kB ROM#94
Fubukimaru merged 1 commit into
Fubukimaru:masterfrom
duhow:issue-5

Conversation

@duhow

@duhow duhow commented Oct 19, 2021

Copy link
Copy Markdown
Collaborator

Fixes #5

@duhow

duhow commented Oct 19, 2021

Copy link
Copy Markdown
Collaborator Author

Given the following code:

.page 1
.rom
.size 48
.start INIT
.db "PAGE 1"
INIT:
ret

.page 2
.db "PAGE 2"

.page 0
.db "PAGE 0"
; EOF

This will succeed for the following request:

  • Page 0 has no cartridge header
  • Page 1 has cartridge header ("AB" + INIT + padding up to 16 bytes)

⚠️ BUT! - INIT code starts at 0x4010, not expected 0x4016 as requested.
By changing the .db input BEFORE doing .start, it works.

 .page 1
 .rom
 .size 48
-.start INIT
 .db "PAGE 1"
+.start INIT
 INIT:
 ret

@Fubukimaru

Copy link
Copy Markdown
Owner

Good work :)

@Fubukimaru Fubukimaru merged commit 11f8ce9 into Fubukimaru:master Oct 20, 2021
@duhow duhow deleted the issue-5 branch October 20, 2021 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[theNestruo] .rom directive not suitable for 48kB ROM

2 participants