clueless wrote:
The NES is a program (with data) meant to be executed.
Under what license is the data?
Quote:
If the end-user could not recreate the NES image by replacing the GPLd code with other code, then the NES image developer has failed to fullfill the GPL requirements.
But if, say, one 16384 byte bank is devoted to the GPL code, and the end user can replace the GPL code with other code, is that any closer?
Quote:
If the NES file is created via (paraphrasing here, I probably totally blew the syntax):
Code:
ca65 gpl-src.s private.s -o game.o
ld65 game.o -o game.nes
Then the resulting "game.nes" is covered under GPL requirements.
I agree. But consider this (again, with loose syntax):
Code:
# mapper: SGROM (MMC1, 16 KiB banks, CHR RAM)
# bank 0: one non-free NROM-128 game's PRG
# bank 1: a second non-free NROM-128 game's PRG
# banks 2-3: a third non-free NROM-256 game's PRG
# bank 4: a copylefted NROM-256 game's PRG
# banks 5-6: CHR for the aforementioned games
# bank 7: a multicart launcher
ca65 gpl-block-game.s -o gpl-block-game.o
ld65 -C lj65.ini gpl-block-game.o -o lj65.prg
ca65 gpl-launcher.s -o gpl-launcher.o
ld65 -C bank7.ini gpl-launcher.o -o bank7.prg
cat inesheader.bin Mario_Bros.prg Ice_Climber.prg Super_Mario_Bros.prg lj65.prg Mario_Bros.chr Ice_Climber.chr Super_Mario_Bros.chr lj65.chr bank7.prg > multicart.nes
Or consider this example of a music player in bank 0 and a game in the rest of the ROM:
Code:
ca65 gpl-music-player.s -o gpl-music-player.o
ld65 -C bank0.ini gpl-music-player.o -o bank0.prg
ca65 private.s -o private.o
ld65 -C bank1thru7.ini private.o -o bank1thru7.prg
cat inesheader.bin bank0.prg bank1thru7.prg > game.nes
In this case, the only entry points in gpl-src are "init" at $8000, "step" at $8003, and "fputc" at $8006. The "step" subroutine does 1/60 s worth of work, and "fputc" implements a pipe-style protocol for, say, starting a song or sound effect. Then bank0 and bank1-7 can individually replaced with something completely different as long as they implement the pipe protocol.
Quote:
I think that it boils down to if "game.nes" is considered an "EXE" (I do) or an "ISO".
Is a self-extracting zip file an "EXE" or an "ISO"?
Quote:
My thoughts are that since the "NES" contains code executed by a 6502 (real or simulated does not matter) it is a "EXE".
The boot sector of an disk image also contains code executed by an x86 CPU. Likewise, only the fixed bank of an NES ROM must contain executable code.
Quote:
I just don't see how a NES image meets the definition of "aggregate" when it does not contain individual internal replaceable parts.
Because a multicart does contain individual internal replaceable parts. Likewise, the communication between a music engine and the rest of the program is pipe-like. They're two programs stored together in one ROM.
Quote:
And even if it did, if the GPL code is executed on the processor in the same address space as non-gpl code
The multicarts don't share address space. The music engine is forbidden to touch memory outside $00F0-$00FF, $0300-$03FF, and the local variable space ($0000-$000F, cleared on entry and exit to the GPL executable). The rest of the program is forbidden to touch that address range. I see nothing in the GPL strictly requiring virtual memory, memory protection, or preemptive multitasking, just that the address spaces are disjoint and that the communication is analogous to pipes. Otherwise, it would be illegal to make a GPL program for Mac OS 9.
Quote:
Address bank-switching not withstanding
What is the fundamental difference between bankswitching as it is understood on the NES and paging as it is understood on an x86 PC?
EDIT: As I understand it, the only difference between GPL and LGPL is whether the two components are allowed to share complex data structures. In both cases, the components must be replaceable.