Does anyone has ASM6 mapper 30 game template?

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

Moderator: Moderators

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

Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Thu Oct 18, 2018 5:27 pm

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.

tepples
Posts: 22044
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Does anyone has ASM6 mapper 30 game template?

Post by tepples » Thu Oct 18, 2018 6:12 pm

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.


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

Re: Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Fri Oct 19, 2018 12:10 pm

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).

tepples
Posts: 22044
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Does anyone has ASM6 mapper 30 game template?

Post by tepples » Fri Oct 19, 2018 12:26 pm

To upgrade a template for 128 KiB UNROM to 512 KiB, find the places where it puts 7 blank banks and put 31 instead.

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

Re: Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Fri Oct 19, 2018 12:42 pm

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.

lidnariq
Posts: 9655
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Does anyone has ASM6 mapper 30 game template?

Post by lidnariq » Fri Oct 19, 2018 12:46 pm

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.

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

Re: Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Fri Oct 19, 2018 1:03 pm

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.

lidnariq
Posts: 9655
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Does anyone has ASM6 mapper 30 game template?

Post by lidnariq » Fri Oct 19, 2018 1:08 pm

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.

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

Re: Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Fri Oct 19, 2018 1:10 pm

Yeah, but I kinda want self-flashing capability (battery-less saving and no bus conflicts) and CHR-RAM (for easy animated tiles).

lidnariq
Posts: 9655
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Does anyone has ASM6 mapper 30 game template?

Post by lidnariq » Fri Oct 19, 2018 1:13 pm

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.

User avatar
rainwarrior
Posts: 7836
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Does anyone has ASM6 mapper 30 game template?

Post by rainwarrior » Fri Oct 19, 2018 1:25 pm

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.

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

Re: Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Fri Oct 19, 2018 2:09 pm

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).

lidnariq
Posts: 9655
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Does anyone has ASM6 mapper 30 game template?

Post by lidnariq » Fri Oct 19, 2018 2:14 pm

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.

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

Re: Does anyone has ASM6 mapper 30 game template?

Post by darkhog » Fri Oct 19, 2018 2:33 pm

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: Select all

;----------------------------------------------------------------
; 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

Post Reply