Page 5 of 5

Re: Membler Industries in 2015

Posted: Fri Mar 16, 2018 6:34 pm
by infiniteneslives
lidnariq wrote:I'm a little confused by their claim that the '824 there supports 17 I/O—unlike some of the older ones, I don't see a way to turn off the I²C logic unit, so that's two pins permanently lost.
From the datasheet, "The SLG46824 has a total of 13 GPIO, 2 GPO and 2 GPI Pins which can function as either a user defined Input or Output, as well as serving as a special function (such as outputting the voltage reference). ... GPI: SCL and SDA serve as General Purpose Input Pins."

Looks like they're general purpose IN only, and including them in the i/o count because of that.

Re: Membler Industries in 2015

Posted: Fri Mar 16, 2018 6:55 pm
by lidnariq
Yeah, but even allowing them to be exclusively inputs, I didn't see a way to disable I²C so that the general fusemap could use them in logic, nor did I see SCL and SDA show up in the matrix (pages 30-31) for use.

Too bad they only mention the '824 and '826 as coming in packages with legs.

Re: Membler Industries in 2015

Posted: Fri Mar 16, 2018 7:00 pm
by infiniteneslives
Ahh I see, possible them being as new as they are the tools aren't fully updated with the silicon's abilities. Sounds like may be worth asking support directly.

Re: Membler Industries in 2015

Posted: Sat Mar 17, 2018 6:26 am
by FrankenGraphics
I see, so it would require quite the redesign involving at least a greenpak and it'd need to be price-comparable to the currently used off the shelf logic devices; which would narrow the range of possibilities further.

I think the most useful division would be the 2 ppu page selects from the cpu page select since they're quite central. separating the 2 ppu page selects from each other or the blinkenlights from the rest seems like "only if there's logic left to use" options.

Re: Membler Industries in 2015

Posted: Sat Mar 17, 2018 1:03 pm
by lidnariq
Eh, just a GreenPak with enough I/O.

Because I enjoy greenpak golf, I was able to stuff something like GTROM into one SLG46537, with the following function map:

Code: Select all

mask: $F000
 $5000: [.... DDDD] - selects 32K PRG bank
 $6000: [.... ...C] - selects 8K CHR RAM bank
 $7000: [.... ...N] - selects 4K NT RAM bank

Re: Membler Industries in 2015

Posted: Mon Sep 24, 2018 11:10 pm
by Memblers
errata note: When one of the two the pattern table pages is selected, the wrong tile may be fetched by the PPU at the exact moment that the CPU writes to the mapper register. To avoid this, you must not write to the mapper during rendering. The other pattern table page is not affected.
I created this rumor, and I can finally put it to bed. The work-around is dead simple - don't use absolute indexed addressing mode to write to the register. E.g., do STA $5000 instead of STA $5000,X. That was easy.

Why this happens, is because the 6502 accesses memory on every cycle. LDA ABS,X takes 4 cycles, 5 if a page boundary is crossed. But STA ABS,X always takes 5 cycles. By the time it hits cycle 4, it's already read the opcode and is working on fixing up the high byte of the address (for page boundary cross) but it's still going to access memory. You wouldn't want it to do a write, because the address hasn't been fixed up yet. So it does a read, and discards it. The mapper register is sensitive to reads, so the register value becomes the open-bus value (the high byte of the address) for one CPU cycle.

That explains why there have been zero complaints about it. It was my testing method that failed. I've hacked a few UNROM games and simply changed the mapper address, but not the opcode, so the glitch manifests. It seemed weird that I didn't see it happening in my own programs. Mystery solved.

So now instead of a bug, we have a strange new feature. It could be used like the PPU 'monochrome bit' to benchmark your CPU usage. Or you could write to it in an idle loop to create a glitchy screen noise effect. It can affect the attribute table as well, which can get pretty colorful. Just do a STA $5000,X if you want to try it.

GTROM - $9.25 each, if you're looking for a cheap simple mapper. $35+shipping for a devkit.

Here's what the mapper write looks like (74HC377).
1(yellow) is register clock (inverted M2)
2(cyan) is register enable !(PRGCE & A12 & A14)
3(magenta) is data output (supposed to be low)

first image is normal write - STA $5000
gtrom_reg_normal.png
second image is glitched write - STA $5000,X
gtrom_reg_indexed.png

Re: Membler Industries in 2015

Posted: Wed Sep 26, 2018 12:40 am
by pubby
Kool. Good job figuring it out!

Re: Membler Industries in 2015

Posted: Thu Jan 24, 2019 3:06 pm
by lidnariq
Memblers wrote:I did a full chip erase, went into ID mode, then dumped the first 256 bytes ($8000-$80FF) and it looks like this:

Code: Select all

BF B7 01 FF 01 FF FF FE FF FF 25 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 0F 06 01 FF (the rest is all FF)
lidnariq wrote:First 64 bytes of the ID memory on this random one I have are:

Code: Select all

BF B7 01 FF 01 FF FF FE FF FF 25 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 0E 0C 04 FF FF FF
I just wanted to briefly follow up on this. At my request Markfrizb looked at a couple very recent (date silk 1844) SST39SF040s and the date bits are not present. The first 32 bytes are unchanged relative to above.

Re: Membler Industries in 2015

Posted: Thu Jan 09, 2020 1:18 pm
by tepples
A game's soundtrack uses sampled bass (as in Journey to Silius and Gimmick!), sampled drums, and sampled sound effects. The DPCM samples total 15 KiB. The programmer also desires a fixed bank. This would result in the following memory map for each bank:

$8000-$9FFF: Data unique to this bank
$A000-$C3FF: Code and data repeated in all banks
$C400-$FFF0: DPCM samples repeated in all banks
$FFF1-$FFFF: Boot stub and vectors repeated in all banks

Would it be considered wasteful to use a 512 KiB bank switching mapper and duplicate the samples and the fixed bank in all banks, leaving only 152 KiB of unique data in the the 512 KiB PRG ROM?

Re: Membler Industries in 2015

Posted: Thu Jan 09, 2020 1:52 pm
by gauauu
tepples wrote:
Thu Jan 09, 2020 1:18 pm
Would it be considered wasteful ....
This seems like a really odd question to me. Who is this person who you fear might think you're being wasteful?

I can't tell if you're genuinely asking whether someone will negatively judge you for doing so (Who cares what they think!), or if you're trying to argue that GTROM is a poor choice for your specific situation (yes, GTROM is likely a poor choice in the case you described).


Does your game meet the game design goals that you have, within the constraints that you care about? Is the low price and convenience of GTROM worth the other trade-offs of the board? If so, use it, and who cares about any imaginary waste. If not, then use a different mapper.

Re: Membler Industries in 2015

Posted: Thu Jan 09, 2020 1:53 pm
by lidnariq
Yes, but so what?

Current cost of 100x SST39SF040-70-4I-WHE-T = $1.33/ (per MicrochipDirect)
Current cost of 100x SST39SF020A-70-4C-WHE = $1.13/ (per MicrochipDirect)
Current cost of 100x GLS27SF020-70-3C-NHE = $0.993/ (via Mouser)
Current cost of 100x NXP 74LVC32ABQ = $0.144/ (via Newark)

You could do this the "right" way and add extra logic to implement 8+24F banking, or the "less wrong" way and add extra logic and bake in some mirroring to emulate 8+24F banking using 16+16F banking, or you can just decide you're going to emulate 8+24F banking from 32K banks. Either way, it's close to the same cost, and there's no other grounds to really care.

Re: Membler Industries in 2015

Posted: Thu Jan 09, 2020 4:47 pm
by Memblers
Depends on what's being wasted too, if it's a game that's going to sell 50 copies it might be better off using a higher-end board, save development time and raise the price. If it's going to sell 500 copies, some kinds of optimizations might be worth the $5000 or whatever. If it's a lot of work in 32kB, earn that money. If it was easy in 32kB, sell the game cheaper. Or whatever combination of those. :D

Re: Membler Industries in 2015

Posted: Thu Jan 09, 2020 6:28 pm
by tepples
gauauu wrote:
Thu Jan 09, 2020 1:52 pm
tepples wrote:
Thu Jan 09, 2020 1:18 pm
Would it be considered wasteful ....
I can't tell if you're genuinely asking whether someone will negatively judge you for doing so (Who cares what they think!), or if you're trying to argue that GTROM is a poor choice for your specific situation (yes, GTROM is likely a poor choice in the case you described).
Specifically, I was trying to find a way to explain to someone, who suggested GTROM in a chat channel, why GTROM isn't the best choice for the project that someone else in the channel was trying to build: a game with an unusually sample-heavy soundtrack.