Is MMC1 "Mapper 28 Compatible" - CC65 Setup

Moderator: Moderators

Post Reply
User avatar
Goose2k
Posts: 182
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Is MMC1 "Mapper 28 Compatible" - CC65 Setup

Post by Goose2k » Tue Nov 24, 2020 4:06 pm

Is MMC1 (Mapper 1) compatible with Mapper 28, as far as the competition requirements go? viewtopic.php?f=35&t=19626

If not, has anyone already set up a CC65 (C code) project compatible with Mapper 28, with hooks for PRG Bank switching CHR RAM writing?

I'd like to submit a game for the competition, but I am using CC65, and have only ever set up 2 mappers (NROM and MMC1) both building on a lot of work by other people.
Last edited by Goose2k on Tue Nov 24, 2020 5:50 pm, edited 1 time in total.

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

Re: Is MMC1 "Mapper 29 Compatible" - CC65 Setup

Post by tepples » Tue Nov 24, 2020 5:49 pm

That's mapper 28, not 29.

If you're interested in using MMC1, I'd consider UNROM instead. Setup is similar to MMC1. If you need the switchable nametable mirroring, you can make an A53 native ROM.

User avatar
Goose2k
Posts: 182
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: Is MMC1 "Mapper 29 Compatible" - CC65 Setup

Post by Goose2k » Tue Nov 24, 2020 5:51 pm

tepples wrote:
Tue Nov 24, 2020 5:49 pm
That's mapper 28, not 29.
Opps! Typo on my part, thanks!
tepples wrote:
Tue Nov 24, 2020 5:49 pm
If you're interested in using MMC1, I'd consider UNROM instead. Setup is similar to MMC1. If you need the switchable nametable mirroring, you can make an A53 native ROM.
Are you aware of a UNROM template for CC65 that I could use as a starting point, by any chance?

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

Re: Is MMC1 "Mapper 28 Compatible" - CC65 Setup

Post by tepples » Tue Nov 24, 2020 5:57 pm

pinobatch/snrom-template covers both SGROM/SNROM and UNROM/UOROM, at least for assembly language. To make it compatible with the compo's size limit, delete banks 3 through 14 from the linker script like so:

Code: Select all

# unrom512kbit.cfg by Damian Yerrick
MEMORY {
  ZP:     start = $10, size = $f0, type = rw;
  # use first $10 zeropage locations as locals
  HEADER: start = 0, size = $0010, type = ro, file = %O, fill=yes, fillval=$00;
  RAM:    start = $0300, size = $0500, type = rw;
  ROM00:  start = $8000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF;
  ROM01:  start = $8000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF;
  ROM02:  start = $8000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF;
  ROM15:  start = $C000, size = $4000, type = ro, file = %O, fill=yes, fillval=$FF;
}

SEGMENTS {
  ZEROPAGE: load = ZP, type = zp;
  BSS:      load = RAM, type = bss, define = yes, align = $100;

  INESHDR:  load = HEADER, type = ro, align = $10;
  BANK00:   load = ROM00, type = ro, align = $100, optional = yes;
  BANK01:   load = ROM01, type = ro, align = $100, optional = yes;
  BANK02:   load = ROM02, type = ro, align = $100, optional = yes;
  DMC:      load = ROM15, type = ro, align = 64, optional = yes;
  CODE:     load = ROM15, type = ro, align = $100;
  RODATA:   load = ROM15, type = ro, align = $100;

  # Because UNROM/UOROM (mapper 2) has a fixed bank at $C000-$FFFF,
  # we need not include the reset stub in all banks.
  STUB15:   load = ROM15, type = ro, start = $FFF0;
}

FILES {
  %O: format = bin;
}
Some more segments might need to be added to make it compatible with C.

User avatar
Goose2k
Posts: 182
Joined: Wed Dec 11, 2019 9:38 pm
Contact:

Re: Is MMC1 "Mapper 28 Compatible" - CC65 Setup

Post by Goose2k » Mon Jan 04, 2021 4:10 pm

Currently my game uses 8 banks of 16K PRG ROM, and 16 banks of 8k CHR ROM.

Would that disqualify my entry given that the entries must be: "Mapper 28 compatible entry up to 64KB with NO PRG-RAM" and my game uses 256KB?

I think the answer seems obvious, but I just want to ask incase there is some technical thing that I am not understanding.

I am only using a fraction of the 128k of CHR ROM right now, but reducing the PRG ROM usage would be a very challenging.

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

Re: Is MMC1 "Mapper 28 Compatible" - CC65 Setup

Post by lidnariq » Mon Jan 04, 2021 4:16 pm

Yeah, the competitions are supposed to be multicarts, and until very recently were all released using 512KB PRG ROMs.

Post Reply