supercat wrote:
At present, developers are effectively limited to mappers that include the specific combinations of attributes that people in the past have needed for their games. Need the ability to switch tile sets on certain rows? MMC2 and MMC4 can do that by using "shift" tiles. Need scan-line IRQ supprt? MMC3 supports that. Need both? Sorry.
Actually, the JY Company mapper (#209) gives you both.
supercat wrote:
Something like a 74hc253 could be used to add IRQ support for a single split-screen in a side-scroller.
...did you mean some other part number? That's limited to choosing to generate an IRQ based on five inputs (A, B, 1G, 1Cn, 2Cn) ... I assume you meant to type the same '688 you mentioned last time.
Quote:
The NES has always supported a "language" beyond 6502 assembly language: the language of electrons.
And your VM doesn't particularly resemble such language of electrons. Writing things for the language you've specified doesn't resemble "oh, I put a latch here clocked by that thing and the output enable tied to this other thing", but instead implies sequentiality.
Quote:
5. A bytecode binary file that could be given to an emulator.
Which I'm supposed to accept is somehow better than a build of an emulator that supports the mapper directly...? Because emulator choice or something? Nevermind that the bytecode is an opaque box and if the result doesn't do what you think it should, you have to be familiar with the bytecode language and maybe your emulator has a VM debugger so that you can figure out what's going wrong... which gets back to the same starting point: you're arguing that the bytecode is somehow easier to understand than the language the emulator is already written in.
Quote:
The only people I'd expect to be writing mapper code directly would be hardware designers, who could either release mapper code for specific configurations, or have a customization page that could generate mapper code customized for the exact hardware options selected.
You are
dramatically overestimating the complexity of adding emulator support in the emulators' native language. Even a bunch of times.
Quote:
Actually, that could be used as a form of DRM
DRM is an antifeature in my book, and any argument that presupposes it being a good thing is going to face extra scrutiny. DRM is nothing more, and nothing less, than a way to take things that could be permanent and make them transient and irrecoverable, excused as a way to make a buck (regardless of whether it actually does) at the cost of all future people forever after.
But even if it weren't: the VM bytecode would be too dense and easily-reverse-engineered of a target to be useful DRM.
Quote:
Someone could make an emulator-only game, but I'm not sure why they'd target a system with the color and sprite limitations of the NES if they weren't intending to make a cart of it.
Because they either don't know, or don't care. People who write music for NSF, because it was defined to support all the different famicom expansion audio at the same time
don't care that using multiple expansions at the same time is unrealistic. NSF supports it.
People wrote ROM hacks and/or translations that targeted oversize MMC3 before all-new-parts reproductions were available. They didn't know that that wasn't something they could get. Sometimes they didn't understand or didn't care (e.g. the patch that removed this size enforcement from Nintendulator's source)
Quote:
And someone who does want to make a cart of a game but doesn't understand hardware should stick to a hardware description made using a board vendor's tools.
So, I'm supposed to accept that vendor lock-in is a good thing?
Quote:
There are many things that couldn't be produced for a price many people would want to pay, but it's not the emulator writer's job to pass such judgments.
That is
exactly what I'm saying
is.
If it can't ever have been affordably reproduced, it isn't an NES game. This isn't some arbitrary definition, this is actually the only thing that's internally consistent.
Quote:
Such auditing needs to be done separately by the maintainers of every emulator.
And every maintainer will have already written the relevant abstractions in support.
Quote:
And looking through the code you linked, I wouldn't say auditing seems particularly easy since it's often not at all clear who's responsible for ensuring that what things are in bounds.
That's the entire point of the abstractions. Use the abstractions, can't get an out-of-bounds access. Don't use the abstractions, and your code is suspect and should be treated with extreme prejudice.
You don't get to disregard the safety of their preexisting abstractions when you're presenting an argument in favor of your own abstraction.
Quote:
I didn't notice the "convenience functions" using any consistent strategy to ensure that they wouldn't overrun their memory allocations if e.g. code on a cartridge that supports different addressing modes sets parameters which would be valid for the current modes, but then switches to a mode where those parameters aren't valid.
... did you look at the same code I did?
what do you think FCEUX's setprg and setchr, and Nestopia's SwapBank, and Mesen's SelectXxxPage functions do?
why would you even think that they would be vulnerable?
why would you even think that's something that should be handled at this level, instead of inside the abstraction?
(it turns out that a bunch of games already rely on the upper bits being discarded)
Quote:
Such mistakes could happen in bytecode as well as in C code, but if they happen in bytecode the interpreter would catch them and signal them an error, without allowing the code to take over the real-world machine.
My argument is:
A VM to emulate this is
1- fragile
2- slow
3- easy to have subtly wrong "safe" surfaces
4- easy to expose attack surfaces
5- everyone's implementation will be subtly different
In contrast, your argument is that all C ever is forever unsafe. That's not a good argument.
Quote:
What fraction of an emulator's time is spent on mapper emulation, as opposed to all the other things the emulator has to do?
In practice, audio emulation seems to be the heaviest, because resampling or band-limited synthesis. Optionally, postprocessing like the NTSC filter or shaders. After that, all that's basically left is the CPU and PPU emulation, and you'll have the mapper overhead on every single cycle of each... possibly dozens of cycles of VM bytecode.
Quote:
it should hardly be surprising that a cart which doesn't really do much beyond basic read/write should be handled using the "handle common case" code.
That's my entire point. You gave a VM machine code implementation of CNROM with PRG RAM, I pointed out that the abstraction already handles that tidily.
I'll assume you want to talk about mapper 96 or MMC4 instead: the native FCEUX abstraction is still cleaner and easier to understand than the corresponding VM source would be. Cleaner, faster, not any more vulnerable.
Quote:
how would you suggest getting around the chicken-and-egg problems of people not wanting to use improved hardware techniques for fear of support, and emulator writers not wanting to support mappers that nobody will ever use?
By involving someone who can make the hardware in the first place and making sure that what they want
can actually be done. Conveniently, at that time, they'll already have a manufacturer lined up.
(this was my 8288th post, the bus controller (permitting multiple masters, e.g. DMA or FPU) in the original IBM PC)