NESICIDE and Nerdy Nights

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

NESICIDE and Nerdy Nights

Post by darkhog » Mon Oct 28, 2013 10:52 pm

Ok, I've started to learn assembly with nerdy nights, but developing using NESICIDE (by the way, NESICIDE's wiki is down, mysql connection error). But when I try to compile first code:

Code: Select all

.org $C000
.org $0000
.incbin "mario.chr"
.org $FFFA     ;first of the three vectors starts here
RESET:
	SEI
	CLD
	LDA %11000000
	STA $2001
	JMP Forever
.org $C000
Forever:
	JMP Forever
(the background color one)

no matter what I do, I get following error:

Code: Select all

sh: C:\Program: No such file or directory
ld65: Error: Input file `nes.lib' not found
make: *** [nerdynights1.prg] Error 1
Build failed while processing Source.
I've got all dependencies from NESICIDE's download site (installed MSI with dependencies), but it can't compile.

The only thing I was able to compile was Alter Ego C demo by Shiru converted into NESICIDE projects, all ASM projects fail.

//edit:

This is from About/Versions window. It may be helpful:
NESICIDE Application version:
V1.038 RELEASE

NES Emulator Library version:
V1.004 RELEASE

Commodore 64 (VICE Interface) Library version:
V1.000 RELEASE

Versions of external dependencies:
cc65:
cc65 V2.13.9
SVN version: unknown

ca65
ca65 V2.13.9 - (C) Copyright 1998-2011 Ullrich von Bassewitz
ca65: No input files

ld65
ld65 V2.13.9 - (C) Copyright 1998-2009, Ullrich von Bassewitz
ld65: Error: No object files to link

make
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-pc-mingw32

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: NESICIDE and Nerdy Nights

Post by thefox » Tue Oct 29, 2013 4:08 am

darkhog wrote:But when I try to compile first code:

Code: Select all

.org $C000
.org $0000
.incbin "mario.chr"
.org $FFFA     ;first of the three vectors starts here
RESET:
	SEI
	CLD
	LDA %11000000
	STA $2001
	JMP Forever
.org $C000
Forever:
	JMP Forever
Where did you get this code? It's wayyyyy broken, especially if it's supposed to target ca65 (the assembler that NESICIDE uses).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NESICIDE and Nerdy Nights

Post by darkhog » Tue Oct 29, 2013 4:15 am

From nerdy nights. And also no project compiles, even those on download page (like russian roulette), only C projects (like Alter Ego) can be compiled. Every asm project I've tried fail with that nes.lib error.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: NESICIDE and Nerdy Nights

Post by thefox » Tue Oct 29, 2013 4:22 am

darkhog wrote:From nerdy nights. And also no project compiles, even those on download page (like russian roulette), only C projects (like Alter Ego) can be compiled. Every asm project I've tried fail with that nes.lib error.
It's definitely not from http://www.nintendoage.com/forum/messag ... eadid=4440
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NESICIDE and Nerdy Nights

Post by darkhog » Tue Oct 29, 2013 4:30 am

Original code didn't want to compile, so I've cut it until it could. Then at linking, nes.lib error.

//edit: But nes.lib thing is in every assembly project for NESICIDE I find and try to compile, only C projects works.

User avatar
tokumaru
Posts: 11944
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: NESICIDE and Nerdy Nights

Post by tokumaru » Tue Oct 29, 2013 6:56 am

Sorry if I can't help with the compiler-specific stuff (ASM6 user here), but your "first code" example is pretty messed up. The CHR should be at the end of the ROM, not the beginning. Also, only the vectors (which are pointers to the NMI, RESET and IRQ labels) are supposed to be at $FFFA, but you put code there. The structure should be more like this:

Code: Select all

	.org $c000

RESET:
	;RESET CODE HERE
	;FOREVER LOOP HERE

NMI:
	;NMI CODE HERE
	rti ;return from interrupt

IRQ:
	;IRQ CODE HERE
	rti ;return from interrupt

	.org $fffa

	.dw NMI ;points to the NMI routine
	.dw RESET ;points to the RESET routine
	.dw IRQ ;points to the IRQ routine

	.incbin "mario.chr"
This is the bare minimum you need to get a functioning ROM. The syntax may differ depending on the assembler, but you definitely need this basic structure for your program to run without crashing.

Again, sorry if this doesn't help with not being able to compile the project, but once you do manage to compile you'll definitely have to fix the program's structure.

User avatar
Memblers
Site Admin
Posts: 3890
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: NESICIDE and Nerdy Nights

Post by Memblers » Mon Nov 04, 2013 7:39 pm

I had that problem with NESICIDE as well, I think what I ended up doing was just copying the nes.lib file from elsewhere (probably Alter Ego source) and put it into my program's folder. I was writing a C program though, but seems to be the same issue anyways.

(edit: whoops, saw your edit that you tried other asm projects, but did you try copying the nes.lib into your project's source anyways?)

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NESICIDE and Nerdy Nights

Post by darkhog » Mon Nov 11, 2013 5:08 am

Sorry. Yes, copying nes.lib works. I was helped by cpow himself on NESICIDE's IRC, just forgot to update thread. Chris assured me that it will be fixed in next version though.

Anyway, anyone knows any nerdy nights-like tutorial that deals with NESICIDE? Translating NESASM into ca65 will be hard for beginner like me and I refuse to use NESASM as it doesn't have many good features that make writing maintainable code easier.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: NESICIDE and Nerdy Nights

Post by thefox » Mon Nov 11, 2013 7:58 am

Somebody has already translated Nerdy Nights to ca65: https://bitbucket.org/ddribin/nerdy-nights/src
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

darkhog
Posts: 192
Joined: Tue Jun 28, 2011 2:39 pm

Re: NESICIDE and Nerdy Nights

Post by darkhog » Mon Nov 11, 2013 9:00 am

Yeah, but those are just sources. It's not as nicely wrapped into tutorials as in NN (great benefit of NN is that it shows some ASM code then explain what it does and how), so reading NN and then substituting NESASM code for ca65 one would be painful. Unless someone translated code in tutorials of course (and adjusted parts of tutorials that refers to how nesasm is doing things and aren't valid for ca65).

User avatar
cpow
NESICIDE developer
Posts: 1099
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: NESICIDE and Nerdy Nights

Post by cpow » Mon Nov 11, 2013 10:24 am

darkhog wrote:Yeah, but those are just sources. It's not as nicely wrapped into tutorials as in NN (great benefit of NN is that it shows some ASM code then explain what it does and how), so reading NN and then substituting NESASM code for ca65 one would be painful. Unless someone translated code in tutorials of course (and adjusted parts of tutorials that refers to how nesasm is doing things and aren't valid for ca65).
You should now be able to compile stuff and have it find nes.lib properly. Let me know.

Post Reply