Sega Li 1.3 (alpha) is a NES/Famicom emulator for Windows, (C) hap 2005.


Controls:

NES controller:		PC, controller 1:	PC, controller 2:
d-pad			arrow keys		I, J, K, L
B, A, select, start	Z, X, C, V		A, S, D, F


Short notes:
- this is an alpha version, expect inspectacularity. the source is a mess too:
  it's based on my Chip8 emulator, ha
- no sound, no savestates, no joypad, no FDS, no (G)UI, no anything else
- load a ROM by using the commandline, or drag&drop a file into the exe
- cycle/pixel exact accuracy
- supported iNES mappers: 0-5,7,9-11,13,32-34,40,42,65,66,68,70,71,87,93-95,97,
  118,119,144,152,155,185,232,234
- zipped files are supported, for ROMs, palettes, and IPS patches. it'll pick
  the first file with valid extension. if it can't find any file with valid
  extension, it'll just pick the first file
- battery backed SRAM files go into the [sram] folder, they are saved/loaded as
  [gamename].sav, and sizes depend on the mapper hardware type, usually 8KB
- custom palettes belong in the [palette] folder, palette files are stored/read
  as r,g,b (3 bytes per colour, 64 colours). the emulator will try to load
  [gamename].pal/zip, if it can't find that, it'll try to load default.pal/zip,
  and if it still fails, it'll use the internal palette, based on region. the
  last-used palette will be saved as [appname].pal, with optional 576 padded
  bytes to be nice to other emulators
- IPS patching is done without altering the source file. the emulator will look
  inside the [patch] folder to find [gamename].ips/zip
- use gcc/mingw to compile. if you reuse source code, credit me, and your
  project should also be(come) open-source (and if you don't, I'll pout)
- Segali is the surname of a certain Mario whom Nintendo accordingly named
  their happy moustached mascot after
- sega li hates slow computers
- sega li likes to crash when you feed it an unsupported ROM, or no ROM
- sega li is free, and dangerously shitty


What's new:

14-08-05: 1.3
Before this mess diminishes its prior self, if it hasn't already done so, a new
version.

so, uh... a lot was changed:

Once upon a time there was a...
- PPU: fixed quite a large error where it (or I ;p) caused wrong pixels to be
  rendered when the PPU address was changed mid-scanline (fixes Rad Racer gfx)
- fixed a DirectInput crash when the window was inactive at startup
- PPU: it wasn't running the correct number of cycles each frame (caused rare
  crashes, though especially in PAL mode)
- palette: support for external palette files
- support for realtime IPS patching
- mappers: fixed Irem G-101 bankswitching (fixes Ai Sensei no Oshiete)
- APU: emulation of the frame sequencer, including frame irqs (fixes Qix, Door
  Door, Shin 4 Nin Uchi Mahjong lockups)
- improved logging: verbosity is optional, exit on error isn't silent anymore,
  timestamp in welcome message, nomore infinite illegal opcode logging
- source: improved the makefile
- added an icon that looks like an ugly blocky blob to people unfamiliar with
  the NES, and Super Mario Bros in particular
- interrupts: removed B flag, support for multiple interrupts (this wasn't
  needed until frame IRQs), edge-triggered timing (fixes Spelunker, Lolo 2,
  Hanjuku Eiyuu lockups)
- PPU: much more accurate rendering (and slower too, yay :( ). this fixes
  sprite overflow timing (but at the same time removing the optional unlimited
  sprites hack), timing of scrollcounter updates, and most importantly, the
  MMC3 scanline counter: nomore evil screenshaking problems
- PPU: returning open-bus values when reading an invalid location, or when the
  PPU is busy (Micro Machines needed this)
- PPU (again): shows correct background colour when rendering is disabled and
  the addressbus is in palette area (fixes Bee 52 and Micro Machines colour
  bars)
- fixed CPU<->PPU synchronisation (Battletoads, and its brother, don't crash
  anymore)
- mappers: fixed MMC5 splitscreen operation (hardly noticeable, but Uchuu
  Keibitai SDF looks better now), fixed MMC5 IRQs: ignore when PPU rendering is
  disabled (fixes Gun Sight)
- palette: more accurate and flexible NTSC-U/NTSC-J/PAL palette calculation
- CPU: source: switched from functions to switch/case, hoping for a speedup to
  compensate for the PPU overhaul, but hardly got any :/
- I misunderstood the 4-screen-VRAM flag in the iNES header (Gauntlet, Gauntlet
  2, and Rad Racer 2 work)
- PPU: sprite address changes during rendering (fixes Akira)
- added a lot more broken-iNES-header-fixes, based on CRC32 (actually, the
  GoodNES maintainer should be the one fixing that, it's ugly in an emulator)
- mappers: fixed MMC3 IRQs, again
- mappers: GNROM: allow IO at WRAM area (fixes Youkai Kurabu)
- mappers: added emulation of iNES mappers 93, 94, 97, and 232 (Camerica
  Quattro games). improved #71 (Fire Hawk mirroring)
- APU: added emulation of the DMC channel (without output), including IRQs
  (fixes Romancia, Guardian Legend, Silent Service, Castelian, Fire Hawk, etc.)
- mappers: MMC3 should also bankswitch after writing to 0x8000 (fixes crashing
  in TMNT3, Days of Thunder, Star Wars, Krusty's Fun House)
- PPU: fixed palette mirroring on 0, 4, 8, c (fixes Micro Machines, yeah this
  game needed many bugfixes, but it's working alright now)
- CPU: fixed AAX illegal opcode (nestest is happy)
- PPU: added behaviour that every odd frame is 1 cycle less
- mappers: moved Death Race to iNES mapper 144 (was 11). rewrote MMC1 and MMC3,
  to make adding MMC1/3-lookalikes easier, MMC3: added iNES mapper 118 (there,
  one lookalike already)
- mappers: seperate source files instead of one huge file
- CPU: don't push data onto the stack with the reset interrupt
- mappers: forgot to check for MMC5 VROM page overflow (fixes Uchuu Keibitai
  SDF from crashing the emulator)
- updated zlib
- mappers: fixed MMC1, MMC5, and MMC6 WRAM handling (strangely, 3 unique bugs)
- mappers: added emulation of iNES mappers 42 (Mario Baby), 65 (Irem H-3001),
  70, 95, 152, 155, and MMC1 SOROM. improved #66 and #87 (forgot to synchronise
  the PPU)
- mappers: fixed MMC5 from saving garbage SRAM and/or old SRAM data
- source: added (more) flexible changing of functionpointers, again reducing
  code size... a little bit
- PPU: improved power-on operation (fixes Cobra Triangle, Ironsword)
- improved handling of external VRAM
- CPU: RAM is initialised with 0xff (fixes Final Fantasy 1 and Minna no Taabou
  no Nakayoshi Daisakusen, but it also breaks some stuff, even though this has
  been confirmed to be accurate behaviour) (see source->cpu_memorymap.h)
- mappers: added iNES mapper 234 (Maxi-15), improved #32 (2 types: Major League
  uses different mirroring), #33 (added IRQ generation)
- auto detection of PAL mode and palettes with GoodNES filenames (eg. " (J)")
- mappers: corrected startup mirroring
- added a silly splash screen (ugh, main.c is really messy now, but I'll get to
  that later)
- source: added DirectDraw skeleton (um... no, not really, 'bone' would be a
  better description)
- kinda broke/downgraded screen drawing. as you can read above, it'll be
  changed to DirectDraw soon
- rewrote this document a bit (well duh, hap, isn't that obvious ? I mean, even
  by writing this line, you're changing it)
- blah blah blah (I like parentheses)
- milk
- bread
- eggs
- cheese
... and they lived happily ever after.

15-06-05: 1.2
Three hoorays for Trevor Belmont!
- mappers: added emulation of MMC5 (see above)
- source: added flexible changing of functionpointers, removing the need for
  huge constant mapper tables
- added DirectInput
- mappers: added emulation of MMC4, Sunsoft 4, and iNES mapper 13. improved
  MMC2 (bankswitch was too early, actually it only affected MMC4), MMC3 (better
  IRQ timing: some games don't have the screen shaking problem anymore), #11
  (support for Death Race), #185 (Banana looks a little bit better)
- improved IRQ handling (pend/acknowledge), Pin Bot looks fine now

01-06-05: 1.1
- source: much more compact binary.h, without speed decrease
- added DirectSound skeleton
- mappers: added emulation of MMC6, Color Dreams, Irem G-101, Taito TC0190/
  TC0350, iNES mappers 34, 40 (SMB2J hack), 71 (Camerica), 119 (Pin Bot), 185
- faster rendering: speed increase of about 50%, and over 100% when colour
  emphasis bits are used
- improved input: support for 2 controllers, some fixes (Paperboy works)
- support for battery backed sram

10-05-05: 1.0
- everything (started development on 23-01-05)


Credits:

- the people at nesdev: http://nesdev.parodius.com/
- Kevin Horton, Brad Taylor, Y0SHi, \Firebug\, Quietust, loopy, blargg, Chris
  Covell, Martin Korth, Disch, some other guys, for their invaluable help
  and/or documentation
- Jean-loup Gailly and Mark Adler, for zlib
- Salomo, for coming up with a nice name for this emulator
- Frits Hilderink, Peter Ammon, Samor, and maybe you too
