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

Strange memory error for the NES. #187

Open
BroDudeGuyMan opened this issue Jun 29, 2024 · 2 comments
Open

Strange memory error for the NES. #187

BroDudeGuyMan opened this issue Jun 29, 2024 · 2 comments

Comments

@BroDudeGuyMan
Copy link

I am coding my first NES game in assembly using the NES 2.0 headers (*.s files) and I was following along Inkbox's beginner tutorial. I was happily frying my brain, and the code ran. It showed the background and 4 sprites that I picked! Everything was going great! I then changed some palette values and then these errors came up:

  1. this.program: Warning: neslib2.cfg:12: Segment 'HEADER' overflows memory area 'HEADER' by 16 bytes

  2. this.program: Warning: neslib2.cfg:28: Segment 'VECTORS' overflows memory area 'VECTORS' by 4 bytes

  3. this.program: Error: Cannot generate most of the files due to memory area overflows

I don't entirely know what happened, but it screamed BUG!

Here are the aforementioned HEADER and VECTORS segments:

.segment "HEADER"
.byte "NES" ;Identification string. MUST HAVE!!
.byte $1A
.byte $02
.byte $01
.byte $00
.byte $00, $00, $00, $00
.byte $00, $00, $00, $00, $00

.segment "VECTORS"
.word NMI
.word RESET
; Specialized hardware interupts

None of the rest of the code is getting flagged, even when I remove these segments.

@sehugg
Copy link
Owner

sehugg commented Jun 30, 2024

The immediate thing that comes to mind, can it be possible you have two copies of the header and vector segments? Or you are .include-ing them again somewhere else?

@BroDudeGuyMan
Copy link
Author

I did not do that. There are only 5 segments in my code: HEADER, ZEROPAGE, STARTUP, VECTORS, and CHAR. When I ran the same code on my local system, it built and ran just fine.

@BroDudeGuyMan BroDudeGuyMan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2024
@BroDudeGuyMan BroDudeGuyMan reopened this Jun 30, 2024
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

No branches or pull requests

2 participants