Page 1 of 1

problem with compiling - include path

Posted: Mon Jan 22, 2007 11:26 am
by mog123
Okay, I'm completely new to development, I know a little NESASM, my goal is to learn it so i can upgrade to SNESASM, which is my true love :)

I'm stuck(windows xp) when i want to compile a Nes File i get an error and my dos window just closes instantly(it took me 5 minutes of trying, to take a print screen to see the error)

Here's the screen:

http://img242.imageshack.us/my.php?image=jpg8kj.jpg

Here's my sourcecode:

Code: Select all

        .inesprg    1
        .ineschr    1
        .inesmir    1
        .inesmap    0

	.org $8000
	.bank 0

Start:


	;this sets up the PPU
	lda #%00001000     
	sta $2000          
	lda #%00011110 
	sta $2001

        lda #$3F        ;set ppu to start of palette
        sta $2006       
        lda #$00        
        sta $2006 
	ldx #$00

loadpal:
	lda titlepal, x  ;loads a 32 byte palette
	sta $2007
	inx
	cpx #$21      ;gotta be one extra b/c of inx
	bne loadpal

Loop:
	jmp Loop


titlepal: .incbin "test.pal"	;palette data


    	.bank 1
	.org	$FFFA
	.dw		0 ;(NMI_Routine)
	.dw		Start ;(Reset_Routine)
	.dw		0 ;(IRQ_Routine)

    .bank 2
    .org    $0000
    .incbin "test.chr"  ;gotta be 8192 bytes long
And yes, i have the palette(32B) and CHR(8kB) file in the same directory as the other files.

Hope to learn this

Posted: Tue Jan 23, 2007 1:26 am
by jsr
To begin with, start the command interpreter (select Run and start 'cmd') and go to the directory where you have the files.
Now the window won't close after exit, and it may also fix your path problem by running it in the same directory as the files.