It is currently Tue Nov 20, 2018 4:38 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Oct 18, 2018 5:27 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
Basic stuff such as header, NES initialization, simple state machine, some mapper30-specific macros and so on. Just so I can start write other stuff (actual game code like data loading, etc.) without having to worry about basics.


Top
 Profile  
 
PostPosted: Thu Oct 18, 2018 6:12 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20789
Location: NE Indiana, USA (NTSC)
You could also use a mapper 2 template, as mapper 30 can run essentially all software designed for mapper 2.

Unfortunately, I've only made one of those for ca65, not ASM6.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 3:53 am 
Offline

Joined: Tue Feb 27, 2018 10:41 am
Posts: 18
Location: Brazil
Also take a look at this viewtopic.php?t=6160 , search for UNROM.
A must read:
https://wiki.nesdev.com/w/index.php/UNROM_512
https://wiki.nesdev.com/w/index.php/Programming_UNROM
https://wiki.nesdev.com/w/index.php/CHR ... to_CHR_RAM


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 12:10 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
Thanks, but I'm looking into UNROM-512 specifically to take advantage of the features of this mapper and INL boards, such as increased ROM space (512KB).


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 12:26 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20789
Location: NE Indiana, USA (NTSC)
To upgrade a template for 128 KiB UNROM to 512 KiB, find the places where it puts 7 blank banks and put 31 instead.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 12:42 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
There are more differences between the two other than the amount of banks. I need a template so I won't get something that doesn't compile.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 12:46 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7723
Location: Seattle
mapper 30 / UNROM512 is literally just mapper 2 with the following modifications:
1- supports self-flashing
2- always has exactly 512 KiB of SST39SF040 flash instead of variable amount of ROM
3- may support multiple banks of CHR RAM (but not always)
4- may support alternative nametable layous (but not always)

None of these other changes will produce something that doesn't compile.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 1:03 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
But they need a different template to Mapper 2 one, up to and including iNES header. And by "not compile" I've actually meant "not compile into a valid Mapper 30 rom", not that there would be any errors or anything like that.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 1:08 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7723
Location: Seattle
There are no relevant differences between a 512 KiB mapper 2 ROM and a 512 KiB mapper 30 ROM.

If it's a valid 512 KiB mapper 2 ROM, it will work as a mapper 30 ROM.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 1:10 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
Yeah, but I kinda want self-flashing capability (battery-less saving and no bus conflicts) and CHR-RAM (for easy animated tiles).


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 1:13 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7723
Location: Seattle
And neither of those have anything to do with the ROM that you've made, and everything to do with the code that you put in it.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 1:25 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6961
Location: Canada
The self flashing feature doesn't involve changing any of the file layout, but the header should select mapper 30 and battery backerd RAM.

The CHR-RAM banking feature also doesn't involve changing any of the file layout, but the header should be iNES 2 and specify 32 KB of CHR-RAM.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 2:09 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
I see. I feel like it'd be best if someone capable could make full UNROM-512 template here (in particular, bank definitions). I can handle actual logic such as initializing the PPU, setting up attributes and name tables and so on, but bank definitions and ines header... that stuff scares me.

//edit: And does anyone has more complete docs of UNROM-512 than what wiki has (which mostly deals with electrical layout of the board and not what memory locations it uses and for what).


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 2:14 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7723
Location: Seattle
Why don't you try making a mapper 30 template from the mapper 2 template that Tokumaru shared and we'll tell you if you did it correctly.


Top
 Profile  
 
PostPosted: Fri Oct 19, 2018 2:33 pm 
Offline

Joined: Tue Jun 28, 2011 2:39 pm
Posts: 192
I may try but I probably wouldn't do it correctly (mostly talking about the header and bank definitions). For example, I don't know what iNES ID does mapper 30 have and if |mirroring of the mapper 2 template still applies. For reference, this is how actual mapper 2 template looks like (with triple semicolons, ;;;, comments added by me to express my doubts):

Code:
;----------------------------------------------------------------
; constants
;----------------------------------------------------------------

MIRRORING = %0001 ;%0000 = horizontal, %0001 = vertical, %1000 = four-screen
;;;does above still apply to mapper 30?

;----------------------------------------------------------------
; variables
;----------------------------------------------------------------

   .enum $0000

   ;NOTE: declare variables using the DSB and DSW directives, like this:

   ;MyVariable0 .dsb 1
   ;MyVariable1 .dsb 3

   .ende

   ;NOTE: you can also split the variable declarations into individual pages, like this:

   ;.enum $0100
   ;.ende

   ;.enum $0200
   ;.ende

;----------------------------------------------------------------
; iNES header
;----------------------------------------------------------------

   .db "NES", $1a ;identification of the iNES header
   .db $08 ;number of 16KB PRG-ROM pages
   .db $00 ;number of 8KB CHR-ROM pages
   .db $20|MIRRORING ;mapper 2 and mirroring ;;what is this section like for mapper 30, INL boards?
   .dsb 9, $00 ;clear the remaining bytes

;----------------------------------------------------------------
; program bank 0
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 0 go here

   .org $c000

;----------------------------------------------------------------
; program bank 1
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 1 go here

   .org $c000

;----------------------------------------------------------------
; program bank 2
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 2 go here

   .org $c000

;----------------------------------------------------------------
; program bank 3
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 3 go here

   .org $c000

;----------------------------------------------------------------
; program bank 4
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 4 go here

   .org $c000

;----------------------------------------------------------------
; program bank 5
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 5 go here

   .org $c000

;----------------------------------------------------------------
; program bank 6
;----------------------------------------------------------------

   .base $8000

   ;NOTE: contents of program bank 6 go here

   .org $c000

;----------------------------------------------------------------
; fixed program bank (7)
;----------------------------------------------------------------

   .base $c000
  ;;;is static bank still #7 or just the last one? In other words, should I add bank declaration of other banks before or after this section?
Reset:

   ;NOTE: initialization code goes here

NMI:

   ;NOTE: NMI code goes here

IRQ:

   ;NOTE: IRQ code goes here

;----------------------------------------------------------------
; interrupt vectors
;----------------------------------------------------------------

   .org $fffa

   .dw NMI
   .dw Reset
   .dw IRQ


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group