Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

duhow
Copy link
Collaborator

@duhow duhow commented Oct 19, 2021

Fixes #5

@duhow
Copy link
Collaborator Author

duhow commented Oct 19, 2021

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
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