Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***********************************************************************************
- Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
- (c) Copyright 1996 - 2002 Gary Henderson ([email protected]),
- Jerremy Koot ([email protected])
- (c) Copyright 2002 - 2004 Matthew Kendora
- (c) Copyright 2002 - 2005 Peter Bortas ([email protected])
- (c) Copyright 2004 - 2005 Joel Yliluoma (http://iki.fi/bisqwit/)
- (c) Copyright 2001 - 2006 John Weidman ([email protected])
- (c) Copyright 2002 - 2006 funkyass ([email protected]),
- Kris Bleakley ([email protected])
- (c) Copyright 2002 - 2010 Brad Jorsch ([email protected]),
- Nach ([email protected]),
- (c) Copyright 2002 - 2011 zones ([email protected])
- (c) Copyright 2006 - 2007 nitsuja
- (c) Copyright 2009 - 2011 BearOso,
- OV2
- BS-X C emulator code
- (c) Copyright 2005 - 2006 Dreamer Nom,
- zones
- C4 x86 assembler and some C emulation code
- (c) Copyright 2000 - 2003 _Demo_ ([email protected]),
- Nach,
- zsKnight ([email protected])
- C4 C++ code
- (c) Copyright 2003 - 2006 Brad Jorsch,
- Nach
- DSP-1 emulator code
- (c) Copyright 1998 - 2006 _Demo_,
- Andreas Naive ([email protected]),
- Gary Henderson,
- Ivar ([email protected]),
- John Weidman,
- Kris Bleakley,
- Matthew Kendora,
- Nach,
- neviksti ([email protected])
- DSP-2 emulator code
- (c) Copyright 2003 John Weidman,
- Kris Bleakley,
- Lord Nightmare ([email protected]),
- Matthew Kendora,
- neviksti
- DSP-3 emulator code
- (c) Copyright 2003 - 2006 John Weidman,
- Kris Bleakley,
- Lancer,
- z80 gaiden
- DSP-4 emulator code
- (c) Copyright 2004 - 2006 Dreamer Nom,
- John Weidman,
- Kris Bleakley,
- Nach,
- z80 gaiden
- OBC1 emulator code
- (c) Copyright 2001 - 2004 zsKnight,
- pagefault ([email protected]),
- Kris Bleakley
- Ported from x86 assembler to C by sanmaiwashi
- SPC7110 and RTC C++ emulator code used in 1.39-1.51
- (c) Copyright 2002 Matthew Kendora with research by
- zsKnight,
- John Weidman,
- Dark Force
- SPC7110 and RTC C++ emulator code used in 1.52+
- (c) Copyright 2009 byuu,
- neviksti
- S-DD1 C emulator code
- (c) Copyright 2003 Brad Jorsch with research by
- Andreas Naive,
- John Weidman
- S-RTC C emulator code
- (c) Copyright 2001 - 2006 byuu,
- John Weidman
- ST010 C++ emulator code
- (c) Copyright 2003 Feather,
- John Weidman,
- Kris Bleakley,
- Matthew Kendora
- Super FX x86 assembler emulator code
- (c) Copyright 1998 - 2003 _Demo_,
- pagefault,
- zsKnight
- Super FX C emulator code
- (c) Copyright 1997 - 1999 Ivar,
- Gary Henderson,
- John Weidman
- Sound emulator code used in 1.5-1.51
- (c) Copyright 1998 - 2003 Brad Martin
- (c) Copyright 1998 - 2006 Charles Bilyue'
- Sound emulator code used in 1.52+
- (c) Copyright 2004 - 2007 Shay Green ([email protected])
- SH assembler code partly based on x86 assembler code
- (c) Copyright 2002 - 2004 Marcus Comstedt ([email protected])
- 2xSaI filter
- (c) Copyright 1999 - 2001 Derek Liauw Kie Fa
- HQ2x, HQ3x, HQ4x filters
- (c) Copyright 2003 Maxim Stepin ([email protected])
- NTSC filter
- (c) Copyright 2006 - 2007 Shay Green
- GTK+ GUI code
- (c) Copyright 2004 - 2011 BearOso
- Win32 GUI code
- (c) Copyright 2003 - 2006 blip,
- funkyass,
- Matthew Kendora,
- Nach,
- nitsuja
- (c) Copyright 2009 - 2011 OV2
- Mac OS GUI code
- (c) Copyright 1998 - 2001 John Stiles
- (c) Copyright 2001 - 2011 zones
- Specific ports contains the works of other authors. See headers in
- individual files.
- Snes9x homepage: http://www.snes9x.com/
- Permission to use, copy, modify and/or distribute Snes9x in both binary
- and source form, for non-commercial purposes, is hereby granted without
- fee, providing that this license information and copyright notice appear
- with all copies and any derived work.
- This software is provided 'as-is', without any express or implied
- warranty. In no event shall the authors be held liable for any damages
- arising from the use of this software or it's derivatives.
- Snes9x is freeware for PERSONAL USE only. Commercial users should
- seek permission of the copyright holders first. Commercial use includes,
- but is not limited to, charging money for Snes9x or software derived from
- Snes9x, including Snes9x or derivatives in commercial game bundles, and/or
- using Snes9x as a promotion for your commercial product.
- The copyright holders request that bug fixes and improvements to the code
- should be forwarded to them so everyone can benefit from the modifications
- in future versions.
- Super NES and Super Nintendo Entertainment System are trademarks of
- Nintendo Co., Limited and its subsidiary companies.
- ***********************************************************************************/
- /*
- Codes used:
- rn = a GSU register (r0 - r15)
- #n = 4 bit immediate value
- #pp = 8 bit immediate value
- (yy) = 8 bit word address (0x0000 - 0x01fe)
- #xx = 16 bit immediate value
- (xx) = 16 bit address (0x0000 - 0xffff)
- */
- // OP HEX - instruction - description
- // 00 - stop - stop GSU execution (and maybe generate an IRQ)
- // 01 - nop - no operation
- // 02 - cache - reintialize GSU cache
- // 03 - lsr - logic shift right
- // 04 - rol - rotate left
- // 05 - bra - branch always
- // 06 - blt - branch on less than
- // 07 - bge - branch on greater or equals
- // 08 - bne - branch on not equal
- // 09 - beq - branch on equal
- // 0a - bpl - branch on plus
- // 0b - bmi - branch on minus
- // 0c - bcc - branch on carry clear
- // 0d - bcs - branch on carry set
- // 0e - bvc - branch on overflow clear
- // 0f - bvs - branch on overflow set
- // 10-1f - to rn - set register n as destination register
- // 10-1f (B) - move rn - move one register to another (if B flag is set)
- // 20-2f - to rn - set register n as source and destination register
- // 30-3b - stw (rn) - store word
- // 30-3b (ALT1) - stb (rn) - store byte
- // 3c - loop - decrement loop counter, and branch on not zero
- // 3d - alt1 - set alt1 mode
- // 3e - alt2 - set alt2 mode
- // 3f - alt3 - set alt3 mode
- // 40-4b - ldw (rn) - load word from RAM
- // 40-4b (ALT1) - ldb (rn) - load byte
- // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
- // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
- // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
- // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
- // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
- // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
- // 4c - plot - plot pixel with R1, R2 as x, y and the color register as the color
- // 4c (ALT1) - rpix - read color of the pixel with R1, R2 as x, y
- // 4d - swap - swap upper and lower byte of a register
- // 4e - color - copy source register to color register
- // 4e (ALT1) - cmode - set plot option register
- // 4f - not - perform exclusive exor with 1 on all bits
- // 50-5f - add rn - add, register + register
- // 50-5f (ALT1) - adc rn - add with carry, register + register
- // 50-5f (ALT2) - add #n - add, register + immediate
- // 50-5f (ALT3) - adc #n - add with carry, register + immediate
- // 60-6f - sub rn - subtract, register - register
- // 60-6f (ALT1) - sbc rn - subtract with carry, register - register
- // 60-6f (ALT2) - sub #n - subtract, register - immediate
- // 60-6f (ALT3) - cmp rn - compare, register, register
- // 70 - merge - R7 as upper byte, R8 as lower byte (used for texture-mapping)
- // 71-7f - and rn - reister & register
- // 71-7f (ALT1) - bic rn - reister & ~register
- // 71-7f (ALT2) - and #n - reister & immediate
- // 71-7f (ALT3) - bic #n - reister & ~immediate
- // 80-8f - mult rn - 8 bit to 16 bit signed multiply, register * register
- // 80-8f (ALT1) - umult rn - 8 bit to 16 bit unsigned multiply, register * register
- // 80-8f (ALT2) - mult #n - 8 bit to 16 bit signed multiply, register * immediate
- // 80-8f (ALT3) - umult #n - 8 bit to 16 bit unsigned multiply, register * immediate
- // 90 - sbk - store word to last accessed RAM address
- // 91-94 - link #n - R11 = R15 + immediate
- // 95 - sex - sign extend 8 bit to 16 bit
- // 96 - asr - aritmetric shift right by one
- // 96 (ALT1) - div2 - aritmetric shift right by one
- // 97 - ror - rotate right by one
- // 98-9d - jmp rn - jump to address of register
- // 98-9d (ALT1) - ljmp rn - set program bank to source register and jump to address of register
- // 9e - lob - set upper byte to zero (keep low byte)
- // 9f - fmult - 16 bit to 32 bit signed multiplication, upper 16 bits only
- // 9f (ALT1) - lmult - 16 bit to 32 bit signed multiplication
- // a0-af - ibt rn, #pp - immediate byte transfer
- // a0-af (ALT1) - lms rn, (yy) - load word from RAM (short address)
- // a0-af (ALT2) - sms (yy), rn - store word in RAM (short address)
- // b0-bf - from rn - set source register
- // b0-bf (B) - moves rn - move register to register, and set flags, (if B flag is set)
- // c0 - hib - move high-byte to low-byte
- // c1-cf - or rn
- // c1-cf (ALT1) - xor rn
- // c1-cf (ALT2) - or #n
- // c1-cf (ALT3) - xor #n
- // d0-de - inc rn - increase by one
- // df - getc - transfer ROM buffer to color register
- // df (ALT2) - ramb - set current RAM bank
- // df (ALT3) - romb - set current ROM bank
- // e0-ee - dec rn - decrement by one
- // ef - getb - get byte from ROM at address R14
- // ef (ALT1) - getbh - get high-byte from ROM at address R14
- // ef (ALT2) - getbl - get low-byte from ROM at address R14
- // ef (ALT3) - getbs - get sign extended byte from ROM at address R14
- // f0-ff - iwt rn, #xx - immediate word transfer to register
- // f0-ff (ALT1) - lm rn, (xx) - load word from RAM
- // f0-ff (ALT2) - sm (xx), rn - store word in RAM
Advertisement
Add Comment
Please, Sign In to add comment