US008157654B2

(12) Ulllted States Patent (10) Patent N0.: US 8,157,654 B2 Link (45) Date of Patent: Apr. 17, 2012

(54) HAND-HELD VIDEO GAME PLATFORM 2 lg; gl?almilz’a , , re er1 sen EMULATION 5,095,798 A 3/1992 Okada et al. . . . 5,134,391 A 7/1992 Okada (75) IHVeHIOII Patl‘lck J- Llllk, Camatlon, WA (Us) 5,153,577 A * 10/1992 Mackey et a1, ,,,,,,,,,,,,, ,, 345/639 5,184,830 A * 2/1993 Okada et al. (73) Assignee: Co., Ltd., Kyoto (JP) 5,265,888 A 11/1993 Yamamoto et al. 5,282,621 A * 2/1994 Tseng ( * ) Not1ce.~ . Subject'~ to any d1scla1mer,~ ~ the term ofth1s- 5,300,9445,395,112 A 4/19943/l995 DarlingShapiro et al. patent 15 extended or adjusted under 35 _ U.S.C. 154(1)) by 1258 days. (Commued) (21) APPL NO; 10/690,818 FOREIGN PATENT DOCUMENTS EP 0 960 637 12/1999 (22) Filed: Oct. 23, 2003 (Continued) (65) Prior Publication Data OTHER PUBLICATIONS Us 2004/0157664 A1 Aug. 12, 2004 Z80-68K-vl50 Z80 Engine Written in 68020 assembler for inclusion in C/C++ projects, Written by Gunter Woigk, dated Dec. 25, 1999* Related US. Application Data (62) D1v1s1on_ _ _ of appl1cat1on_ _ No. 09/723,322, ?led on Nov. (Continued) 28, 2000, HOW Pat- NO- 6,672,963 Primary Examiner * Dmitry Suhol 51 I t Cl A sslslanl' Exammer ' * D av1'd D u ffy ( ) An6éF M4 (2006 01) (74) Attorney, Agent, or Firm 4 Nixon & Vanderhye RC. (52) US. Cl...... 463/43; 463/1; 463/44; 463/45 (57) ABSTRACT (58) Fleld of Classl?catlon Search """ A software emulator for emulating a handheld video game See application ?le for complete search histaorsy. platform Such as ®’ ® and/or ® on a low-capability target (56) References Cited platform (e.g., a seat-back display for airline or train use, a personal digital assistant, a cell phone) uses a number of US. PATENT DOCUMENTS features and optimizations to provide high quality graphics and sound that nearly duplicates the game playing experience 4,481,529 A 11/1984 Kerling 4,516,777 A 5/1985 Nikora on the native platform. Some exemplary features include use 4,542,903 A 9/1985 Yokoiet al. of bit BLITing, graphics character reformatting, modeling of 4,628,304 A 12/1986 Bottiau a native platform liquid crystal display controller using a 4,756,528 A 7/1988 Umashankar sequential state machine, and selective skipping of frame 4,771,279 A * 9/1988 Hannah ...... 345/559 display updates if the game play falls behind What Would 4,858,930 A 8/1989 Sato 4,903,218 A 2/1990 Longo et a1. occur on the native platform. 4,922,420 A 5/1990 NakagaWa et al. 4,924,413 A 5/1990 Suwannukul 27 Claims, 33 Drawing Sheets

MEMORY FUNCTION PTR PIR M M M 0 X FFBO 0 KEY 178

O X E000 PAGED 172,175 0 X D000 : 110m F'XED 7 / 0 X 8000

“2 M 4000 59,135 0 |

EXAMPLE PAGE TABLE US 8,157,654 B2 Page 2

US. PATENT DOCUMENTS CD containing the following ?les, Donkey1.Zip ?le, S9xiwindowsi 5,400,053 A 3/1995 Joharyetal. 119a36ii386.Zip, smygb02.Zip, yoshi.GB, Directory listings of the 5,412,800 A 5/1995 Briletal. ?les on CD. 5,442,375 A 8/1995 WojacZynskiet al. U.S. Appl. No. 09/617,669, ?led Jul. 17, 2000. 5,448,263 A 9/1995 Martin US. Appl. No. 09/617,624, ?led Jul. 17, 2000. 5,552,799 A 9/1996 Hashiguchi Printout of windowslxt ?le, “Snes9X: The Portable Super Nintendo 5,556,108 A * 9/1996 Nagano et al. Entertainment System Emulator,” v1.19 (Jun. 5, 1999). 5,559,954 A 9/1996 Sakodaetal. Printout of Readmejxt, “Snes9X: The Portable Super Nintendo RE35,520 E 5/1997 Darling et al. Entertainment System Emulator,” v1.19 (Jun. 5, 1999). 5,759,104 A 6/1998 Shirae et al. Printout of Readmee.txt, “SMYGB4Game Boy Emulator v0.20,” 5,768,593 A 6/1998 Walters et al. by Ming-yu Shih (Jan. 2, 1999). 5,781,758 A * 7/1998 Morley ...... 703/23 “Professional Power,” Sinclair Research promotional brochure 5,785,598 A 7/1998 Hsu 5,790,096 A 8/1998 Hill, Jr. (1982), found at http://www.nvg.ntnu.no/sinclair/computers/ 5,790,825 A * 8/1998 Traut ...... 712/209 Zxspectrum/professionalipowerhtm. 5,793,351 A 8/1998 Leach “ZX Spectrum Technical Data,” Sinclair Research lea?et (1982), 5,819,063 A * 10/1998 Dahletal...... 703/27 found at http://www.nvg.ntnu.no/sinclair/computers/Zxspectrum/ 5,844,532 A 12/1998 Silverbrook et al. specitechnicalhtm. 5,854,620 A 12/1998 Mills et al. MAME: The Of?cial Multiple Arcade Machine Emulator Site, circa 5,892,939 A 4/1999 Call et al. 1997, http://www.mame.net. 5,903,760 A * 5/1999 Farber et al...... 717/146 MAME: Readme: circa 1997, http://www.mame.net/readme.html. 5,959,596 A 9/1999 McCarten et al. MAME FAQs: circa 1997, http://www.mame.net/mamefaq.html. 6,007,428 A * 12/1999 Nishiumiet al...... 463/36 NO$GMB FAQs: circa 1997, published with program downloaded 6,020,751 A 2/2000 Rampone etal. from http://www.work.de/nocash/gmb.htm. 6,047,373 A 4/2000 Hall et al. 6,058,288 A * 5/2000 Reed et al...... 455/3.06 Computer Closet Collection, NEC Turbo Express, printed from 6,084,600 A * 7/2000 Munshi ...... 345/545 wysiwyg://22/http://www.geocities.com/~compcloset/ 6,115,054 A 9/2000 Giles NECTurboExpresshtm on Sep. 28, 2000 (2 pages), copyright 1997 6,132,315 A 10/2000 Miyamoto et al. 1999, last modi?ed Jun. 24, 1999. 6,192,446 B1* 2/2001 Mullarkey et al...... 711/105 NEC Turbo Express, printed from http://www.edu.uni-klu.ac.at/~ 6,315,669 B1* 11/2001 Okadaetal. kseiner/expresshtml on Sep. 28, 2000 (2 pages), document date 6,390,920 B1 5/2002 In?esto 6131. unknown. 6,409,602 B1 6/2002 Wiltshire etal. Turbo Express FAQ, printed from http://www.gameconsoles.com/ 6,651,132 B1 11/2003 Traut turboexpifaqhtm on Sep. 28, 2000 (18 pages), last revision of 6,658,056 131* 12/2003 DuruoZ etal...... 375/240 document: May 25, 1995. 2003/0207712 A1* 11/2003 Sterchietal...... 463/23 Computer Closet Collection, , printed from FOREIGN PATENT DOCUMENTS wysiwyg://28/http://www.geocities.com/~compcloset/ SegaGameGearhtm on Sep. 28, 2000 (2 pages), copyright 1997 JP 63242293 10/1988 1999, last modi?ed Jun. 22, 1999. JP 4-49989 2/1992 JP 4-140791 5/1992 The Real Game Gear FAQ, Version GG.04, Dec. 1999, printed from JP 4-140792 5/1992 http://www.classicgaming.com/museum/realggfaqtxt on Sep. 28, JP 04261589 A * 9/1992 2000 (32 pages). JP 7-204349 8/1995 Computer Closet Collection, Lynx, printed from wysiwyg:// 12/ JP 10137447 5/1998 http://www.geocities.com/~compcloset/AtariLynx.htm on Sep. 28, JP 10328408 12/1998 2000 (2 pages), copyright 1997-1999, last modi?ed Jun. 22, 1999. JP 11207034 8/1999 [FAQ] Frequently-Asked Questions, printed from http:// JP 11333144 12/1999 www.land?eld.com/faqs/games/video-games/atari/lynx on Sep. 28, W0 W00039693 7/2000 2000 (16 pages), last revision of document: May 1, 2000. W0 W0 02/06941 A2 1/2002 Computer Closet Collection, Nintendo Game Boy/ Game Boy Light, W0 W0 02/06947 A2 1/2002 printed from wysiwyg://40/http://www.geocities.com/~compcloset/ W0 W0 02/08905 A2 1/2002 W0 W0 02/08905 A3 1/2002 NintendoGameBoyhtm on Sep. 28, 2000 (5 pages), copyright 1997 1999, last modi?ed Jun. 22, 1999. OTHER PUBLICATIONS Computer Closet Collection, Milton-Bradley , printed from wysiwyg://52/http://www.geocities.com/~compcloset/ Snes9x: The Portable Super Nintendo Entertainment System Emu MiltonBradley-Microvision.htm on Sep. 28, 2000 (2 pages), copy latorv1.19, Jun. 5, 1999.* right 1997-1999, last modi?ed Jun. 22, 1999. Adam Polanski, Jan. 7, 1999, Gameboy 98 Homepage, pp. 1-4.* Microvision FAQ Version 0.08, copyright 1994, 1995, printed from Charest, “Z80 Emulator” (Microprofusion), 2000.* http://www.gameconsoles.com/microvisionifaqhtm on Sep. 28, FayZeillin, Documents Relating to Emulators in General and the Z80 2000 (13 pages). Processor, 1997-2000.* Computer Closet Collection, Sega Nomad, printed from wysiwyg:// Lanter Z80 v.4.00 Emulator Documentation, 1999.* 34/http://www.geocities.com/~compcloset/SegaNomadhtm on Sep. Multiple Arcade Machine Emulator (MAME) Documentation, 1997 28, 2000 (2 pages), copyright 1997-1999, last modi?ed Jun. 22, 1999. 1999.* Sega Nomad Press Announcement of Aug. 22, 1995, printed from Shih, Ming-yu, Readmeelxt, “SMYGB4Game Boy Emulator http://gameZero.com/team-0/whatsinew/past/nomad.html on Sep. v0.20,” ([email protected]), HTTP://www.billyjr.com/ 28, 2000 (2 pages). smygb/ (Jan. 2, 1999). Computer Closet Collection, Tiger Game.com, printed from “Snarkofagen’s Emulation, The Latest Emulator News,” HTTP:// wysiwyg://46/http://www.geocities.com/~compcloset/ home.swipnet.se/snarkofagen/, (Nov. 15, 1999 to Dec. 29, 1999). TigerGameComhtm on Sep. 28, 2000 (1 page), copyright 1997 “NO$GMBiversion 2.5, nocash gameboy emulator/debugger for 1999, last modi?ed Jun. 22, 1999. dos/windows” HTTP://www.work.de/nocash/gmbhtm. Tiger Game.Com, “Low Cost, Big Games”, printed from http:// “Welcome to my Vgb page,” HTTP://elektron.et.tudelft.nl/~ gamecenter.com/Consoles/Features/Pocket/ss02.htrnl on Sep. 28, jdegoede/vgbhtml. 2000 (2 pages), document date unknown. BleemlTM, Play hundreds of Playstation Games on Your PC. Lanter Z80 v4.00 Emulator Documentation, 1999. bleem! technotes: graphics, “Support/PC/Technotes,” web site infor Readme vba v0.4.txt, “Welcome to VisualBoyAdvance version 0.4” mation, www.bleem.com, 20 pages (2001). (Sep. 16,2001). US 8,157,654 B2 Page 3

CopyrightTXt, homepage: http://vboy.emuhq.com (200l). News about PalmBoy, http://palmboy.suburbia.com.au/news.htm. VisualBoyAdvance Homepage, http://vba.ngemu.com/, Screen PhoiniX by Bodo WenZel, PhoiniX, the free Gameboy emulator for shots, Downloads, FAQ, Links, Support Us (2002-2004). PalmOS, http://phoiniX.sourceforge.net/. Zophar’s Domain: GameBoy Emulators, http://www.Zophar.net/gb. Gambit StudiosiLiberty Game Boy Emulator, http://www. htrnl (12 pages). gambitstudios.com/Libertyasp. Zophar’s Domain: GameBoy Advance Emulators, http://www. Gambit Studios About Us, http://www.gambitstudios.com/ companyinfo .asp. Zophar.net/gb.html (4 pages). Gambit Studios What’s New, http://www.gambitstudios.com/ MAMEiThe of?cial Multiple Arcade Machine Emulator site, whatsnew.asp. http://www.mame.net/. U.S. Appl. No. 09/617,709, ?led Jul. 17, 2000. Visual Boy Advance Quick Start Guide (2003). NOSGMB FAQs: circa 1997. published with program downloaded Visual Boy Advance Software (copyright 200 l -2002 by Forgotten). from http://www.work.de/nocash/gmbhtm. PalmBoy by Bodo WenZel, PalmBoy v.3.3b, http://palmboy.subur bia.com.au. * cited by examiner US. Patent Apr. 17, 2012 Sheet 1 0f 33 US 8,157,654 B2

1AFig. US. Patent A r. 17 2012 Sheet2 0f33

m:at US. Patent Apr. 17, 2012 Sheet 3 0f 33 US 8,157,654 B2

[My /

2at US. Patent Apr. 17, 2012 Sheet 4 0f 33 US 8,157,654 B2

9.mt

US. Patent Apr. 17, 2012 Sheet 6 0f 33 US 8,157,654 B2

( Start >

V Receive game binary image '\/70

v Activate any game-specific emulator options

V Pause and interpret binary image -\/72

it Receive user inputs \/74

V Generate sound commands '\/76

V Generate graphics commands '\/78

V Emulate motive LCD controller V80

V Emulate motive Memory -\/82

V

Fig. 2A US. Patent Apr. 17, 2012 Sheet 7 0f 33 US 8,157,654 B2

RUNGAME EMULATE DRAW_CGB DRAW_DMG DRAW__AGB ROMREG VIDEO VGA BUTTONS SOUND NOWRITE PORTMODE CGBRAM DMA MBC SIO ADAPTERS TIMER # |

Fig. 3 EXAMPLE FUNCTIONAL MODULES

US. Patent Apr. 17, 2012 Sheet 10 0f 33 US 8,157,654 B2

Fig. 6 Compatibility modes: CGBBINCOMPATIBLE CGB__COMPAT|BLE CGB_EXCLUSIVE AGB

Registration Data Locations:

ROMREG_CGB ROMREG_CARTRIDGE ROMREG?ROM ROMREG__RAM Fig. 7 US. Patent Apr. 17, 2012 Sheet 11 0133 US 8,157,654 B2

Fig. 8 EXAMPLE VIRTUAL LCD CONTROLLER STATE MACHINE

0AM SEARCH 26(2l)/52 cycles

0AM XF ER 47(42) /94 cycles

HBLANK 56(5l)/l 12 cycles

v Lines 144-154

VBLANK (HBLANK + OAM + Transfer) US. Patent Apr. 17, 2012 Sheet 12 0f 33 US 8,157,654 B2

260

LCD CYCLE COUNTER

262 LCDMODLHBLANK j LCDMODE_VBLANK LCDMODE_OAM LCD MODE — LCDMODE_TRANSFER LCDMODE_DISABLED LCDMODLREENABLED

LCD_ BG_ ENABLED

266

LCD_W|NDOW_ENABLED

LCD_OBJ_ENABLED

LCD_BIG_OBJ

LAST_O BJ__D RAW_L|NE

Fig. 9A EXAMPLE LCD CONTROLLER EMULATION US. Patent Apr. 17, 2012 Sheet 13 0f 33 US 8,157,654 B2 US. Patent Apr. 17, 2012 Sheet 14 0133 US 8,157,654 B2

amNEE/2EE52,»:- .25viii5201235v.25?++ Q2,x7252E:,,xz?mz55% 8at N::8x25?% acu182mma520 aas“52$:s2% moo055:65$655Q US. Patent Apr. 17, 2012 Sheet 15 0f 33 US 8,157,654 B2

LOAD CYCLE COUNTER WITH APPROPRIATE VALUE

V II DECREMENT CYCLE COUNTER AT EIVIULATED CPU RATE

310 ~ J TRANSITION VIRTUAL LCD CONTROLLER TO NEXT PHASE

316 SET DO_FRAME FLAG TO J SKIP DRAWING NEXT FRAME

Fig. 10 EXAMPLE LIQUID CRYSTAL DISPLAY CONTROLLER US. Patent Apr. 17, 2012 Sheet 16 0f 33 US 8,157,654 B2

BINARY OPCODE

V OPCODE H ——-——>ADDRESS Ag

V OPCODE1 —-—>ADDRESS A1

- OPCODE 2 ‘—--——>ADDRESS A 2 w-\/\ :g A———-> OPCODE N —-——>ADDRESS A N

Fig. 11 EXAMPLE OPCODE JUMP TABLE US. Patent Apr. 17, 2012 Sheet 17 0f 33 US 8,157,654 B2

320

INCREMENT 322 PROGRAM 1 COUNTER l DECREMENT 306 CYCLE J COUNT

TIMER 324 PARSE NEXT OP-CODE

Fig. 12 EXAMPLE NOP EMULATION