NES Rom File Don't Show The Text.
Moderator: Moderators
NES Rom File Don't Show The Text.
Here Is The Picture and You Djudj:
Last edited by robocop on Mon Apr 02, 2018 6:12 pm, edited 1 time in total.
Re: NES Rom File Don't Show The Text.
Does the startup code wait for vblank twice before calling main()?
Why are there braces around the TEXT string?
Have you looked at the assembly language output that the C compiler is generating?
Why are there braces around the TEXT string?
Have you looked at the assembly language output that the C compiler is generating?
Re: NES Rom File Don't Show The Text.
It doesn't look like you're initializing e attribute tables either, so there are no guarantees that the first palette is bring used where the text is.
Re: NES Rom File Don't Show The Text.
Here Is The Source I Get It:tepples wrote:Does the startup code wait for vblank twice before calling main()?
Why are there braces around the TEXT string?
Have you looked at the assembly language output that the C compiler is generating?
https://nesdoug.com/2015/11/17/3-our-first-program/
Re: NES Rom File Don't Show The Text.
Have you included appropriate CHR data into the ROM? If there are no graphics data, there will be no... graphics, i.e. no text can be seen.
Re: NES Rom File Don't Show The Text.
Post the ROM, should be easy to diagnose.
Every example code needs a good rewriting. One day.
See...comments like this make me think that nobody has actually reviewed the code on my blog. There are probably 1000 non-standard things that I am doing that people should notify me about.Does the startup code wait for vblank twice before calling main()?
Why are there braces around the TEXT string?
Every example code needs a good rewriting. One day.
nesdoug.com -- blog/tutorial on programming for the NES
Re: NES Rom File Don't Show The Text.
How ????? Give Me The Way.Gilbert wrote:Have you included appropriate CHR data into the ROM? If there are no graphics data, there will be no... graphics, i.e. no text can be seen.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: NES Rom File Don't Show The Text.
in most assemblers, you simply write .incbin filename.chr or .bin filename.chr in the appropriate place.
idk what this program is using though. Looks like it might have some GUI going on.. maybe there’s an import chr button or something
idk what this program is using though. Looks like it might have some GUI going on.. maybe there’s an import chr button or something
Re: NES Rom File Don't Show The Text.
I downloaded lesson1.zip and took a peek. I don't know how this would work exactly with Visual Studio because I'm not familiar with that. There is a general Makefile (GNU-ish, sort of), and also a compile.bat. It appears to have reliance on the cc65 suite and nes.lib. There is indeed a nes.cfg (for ld65). There is a bunch of assembly code also involved. There is an 8kByte .chr file called Alpha.chr that appears to be a basic alphabet, ASCII-mapped.
nes.cfg contains the below (comments removed for brevity):
reset.s contains this, which comes after .segment "VECTORS"; rest of the assembly code omitted for brevity:
nes.cfg contains the below (comments removed for brevity):
Code: Select all
MEMORY {
ZP: start = $00, size = $100, type = rw, define = yes;
OAM1: start = $0200, size = $0100, define = yes;
RAM: start = $0300, size = $0400, define = yes;
HEADER: start = $0, size = $10, file = %O ,fill = yes;
PRG: start = $c000, size = $3ffa, file = %O ,fill = yes, define = yes;
VECTORS: start = $fffa, size = $6, file = %O, fill = yes;
CHR: start = $0000, size = $2000, file = %O, fill = yes;
}
SEGMENTS {
HEADER: load = HEADER, type = ro;
STARTUP: load = PRG, type = ro, define = yes;
LOWCODE: load = PRG, type = ro, optional = yes;
INIT: load = PRG, type = ro, define = yes, optional = yes;
CODE: load = PRG, type = ro, define = yes;
RODATA: load = PRG, type = ro, define = yes;
DATA: load = PRG, run = RAM, type = rw, define = yes;
VECTORS: load = VECTORS, type = rw;
CHARS: load = CHR, type = rw;
BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp;
ONCE: load = PRG, type = ro, define = yes;
}
FEATURES {
CONDES: segment = INIT,
type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__;
CONDES: segment = RODATA,
type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__;
CONDES: type = interruptor,
segment = RODATA,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__;
}
SYMBOLS {
__STACKSIZE__: type = weak, value = $0100;
__STACK_START__: type = weak, value = $700;
}
Code: Select all
.segment "CHARS"
.incbin "Alpha.chr"
Re: NES Rom File Don't Show The Text.
I just Chenged The Name Of The Project and the path.koitsu wrote:I downloaded lesson1.zip and took a peek. I don't know how this would work exactly with Visual Studio because I'm not familiar with that. There is a general Makefile (GNU-ish, sort of), and also a compile.bat. It appears to have reliance on the cc65 suite and nes.lib. There is indeed a nes.cfg (for ld65). There is a bunch of assembly code also involved. There is an 8kByte .chr file called Alpha.chr that appears to be a basic alphabet, ASCII-mapped.
nes.cfg contains the below (comments removed for brevity):
reset.s contains this, which comes after .segment "VECTORS"; rest of the assembly code omitted for brevity:Code: Select all
MEMORY { ZP: start = $00, size = $100, type = rw, define = yes; OAM1: start = $0200, size = $0100, define = yes; RAM: start = $0300, size = $0400, define = yes; HEADER: start = $0, size = $10, file = %O ,fill = yes; PRG: start = $c000, size = $3ffa, file = %O ,fill = yes, define = yes; VECTORS: start = $fffa, size = $6, file = %O, fill = yes; CHR: start = $0000, size = $2000, file = %O, fill = yes; } SEGMENTS { HEADER: load = HEADER, type = ro; STARTUP: load = PRG, type = ro, define = yes; LOWCODE: load = PRG, type = ro, optional = yes; INIT: load = PRG, type = ro, define = yes, optional = yes; CODE: load = PRG, type = ro, define = yes; RODATA: load = PRG, type = ro, define = yes; DATA: load = PRG, run = RAM, type = rw, define = yes; VECTORS: load = VECTORS, type = rw; CHARS: load = CHR, type = rw; BSS: load = RAM, type = bss, define = yes; HEAP: load = RAM, type = bss, optional = yes; ZEROPAGE: load = ZP, type = zp; ONCE: load = PRG, type = ro, define = yes; } FEATURES { CONDES: segment = INIT, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; CONDES: type = interruptor, segment = RODATA, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__: type = weak, value = $0100; __STACK_START__: type = weak, value = $700; }
Code: Select all
.segment "CHARS" .incbin "Alpha.chr"
look the message that is sho it to me.
Re: NES Rom File Don't Show The Text.
LD65 error, line 72 of nes.cfg, attribute expected.
They changed cc65/ld65 at some point, and I had to update the linker file (nes.cfg). Are you sure you are using the most recent version of my code?
Anyway...the attribute that was missing was something like "value = $100"...I can't remember since I didn't save a copy of the oldest version of lesson1 (the older version allowed something like "start = $100" maybe).
Also, I changed __STACK_SIZE__ to __STACKSIZE__. I don't know if this is related, but that is what's located at line 72
They changed cc65/ld65 at some point, and I had to update the linker file (nes.cfg). Are you sure you are using the most recent version of my code?
Anyway...the attribute that was missing was something like "value = $100"...I can't remember since I didn't save a copy of the oldest version of lesson1 (the older version allowed something like "start = $100" maybe).
Also, I changed __STACK_SIZE__ to __STACKSIZE__. I don't know if this is related, but that is what's located at line 72
Last edited by dougeff on Tue Apr 03, 2018 7:59 am, edited 1 time in total.
nesdoug.com -- blog/tutorial on programming for the NES
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: NES Rom File Don't Show The Text.
According to the reference,
defined symbols only need to have a type (it's mandatory), but if the type is weakor export it also needs a value.
the lesson1.zip that was linked contains the following:
which should be correct, unless something else has changed and they forgot to update the reference guide.
defined symbols only need to have a type (it's mandatory), but if the type is weakor export it also needs a value.
the lesson1.zip that was linked contains the following:
Code: Select all
SYMBOLS {
__STACKSIZE__: type = weak, value = $0100; # 1 page stack
__STACK_START__: type = weak, value = $700;
}
Re: NES Rom File Don't Show The Text.
the probleme is not in c code it's in the bat file.FrankenGraphics wrote:According to the reference,
defined symbols only need to have a type (it's mandatory), but if the type is weakor export it also needs a value.
the lesson1.zip that was linked contains the following:which should be correct, unless something else has changed and they forgot to update the reference guide.Code: Select all
SYMBOLS { __STACKSIZE__: type = weak, value = $0100; # 1 page stack __STACK_START__: type = weak, value = $700; }
Re: NES Rom File Don't Show The Text.
I just told you where the problem is.
nes.cfg, line 72. attribute expected.
EDIT.
nes.cfg, line 72. attribute expected.
EDIT.
Perhaps you have 2 versions of cc65 on your machine, and changing the path redirected it to the other version. See my comment just above about ld65 changed and I had to rewrite the linker file (nes.cfg)I just Chenged The Name Of The Project and the path.
nesdoug.com -- blog/tutorial on programming for the NES
Re: NES Rom File Don't Show The Text.
Ok When You Chenge It Just Type It Here In The Topic.dougeff wrote:I just told you where the problem is.
nes.cfg, line 72. attribute expected.
EDIT.Perhaps you have 2 versions of cc65 on your machine, and changing the path redirected it to the other version. See my comment just above about ld65 changed and I had to rewrite the linker file (nes.cfg)I just Chenged The Name Of The Project and the path.
Thanx.