Re: [cc65] Hypothetical

Date view Thread view Subject view

From: Gary (gary_at_sybersoft.lv)
Date: 2002-02-01 21:08:59


Here's a linker script for the simple case of one 16k fixed bank at
0xC000 and one 16k switchable bank at 0x8000.  This script defines
only a single memory block for the switchable bank; to use more banks,
replicate the BANK line in the MEMORY declaration using different
names for each bank.

This command builds a .nes file from the linker output:

cat romhdr.bin bank.bin home.bin chr.bin chr.bin > ccd.nes

The .nes file header (ROMHDR section) is generated with this
assembly source:

	.segment "ROMHDR"
	
	.byte	"NES", $1a	; NES^Z
	.byte	2		; #16k PRG ROM banks
	.byte	1		; #8k CHR ROM banks
	.byte	0
	.byte	0		; 
	.byte	0,0,0,0,0,0,0,0	; reserved

	.end
	
The character memory image is generated from an assembly file, too.
Only 4k of character memory is used in the current application, which
is why the chr.bin file is duplicated in the preceding command line.

Regards,

Gary

On Fri, Feb 01, 2002 at 10:27:52AM -0500, Keates, Mark wrote:
> Has anyone built a config file that could be used
> to generate a NES rom image during the link phase?
> 
> Might be quite nice to experiment with some
> NES graphics/bank switching models etc.
> 
> Thought I'd ask as the list's a little slow at the mo ;-)
> 
> Regards,
> 
> Mark
> ----------------------------------------------------------------------
> To unsubscribe from the list send mail to majordomo_at_musoftware.de with
> the string "unsubscribe cc65" in the body(!) of the mail.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-02-01 21:09:26 CET