Repository navigation
Expand file tree
/
Copy pathconfig.example.py
More file actions
2096 lines (2040 loc) · 69.6 KB
/
Copy pathconfig.example.py
File metadata and controls
2096 lines (2040 loc) · 69.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# config.py - RetroDB Configuration
# ================================================
# Application constants and internal defaults.
# DO NOT edit this file — all user settings (paths, API keys) are configured
# via the web UI and stored in data/settings.json and data/scraper_settings.json.
#
# SETUP: Copy this file to config.py, then run the app and use the setup wizard.
# cp config.example.py config.py
#
# Environment variable overrides (RETRODB_ prefix):
# RETRODB_DB_PATH - Database file path
# RETRODB_HOST - Server bind address (default: 0.0.0.0)
# RETRODB_PORT - Server port, 1-65535 (default: 5000)
# PORT - Server port, 1024-65535; wins over RETRODB_PORT.
# For an external supervisor that assigns a port.
# RETRODB_DEBUG - Debug mode: "true" or "false" (default: false)
# RETRODB_SECRET_KEY - Flask secret key (overrides auto-generated key)
import os
import sys
from server_port import DEFAULT_PORT, resolve_server_port
# =============================================================================
# INTERNAL PATHS (not user-configurable here — use Settings page)
# =============================================================================
# BASE_DIR — writable user data root (database, logs, scraped media, settings).
# BUNDLE_DIR — read-only app assets root (templates, CSS/JS/fonts, vendored docs).
#
# In a normal `python app.py` install they are the same directory. In a
# PyInstaller frozen bundle (Pass 46.3) BASE_DIR sits next to the launcher
# while BUNDLE_DIR is sys._MEIPASS — the temp / onedir extraction root. The
# split keeps user data outside _internal/ so upgrades just replace the
# bundle and the data dirs survive untouched.
if getattr(sys, 'frozen', False):
BASE_DIR = os.path.dirname(os.path.abspath(sys.executable))
BUNDLE_DIR = getattr(sys, '_MEIPASS', BASE_DIR)
else:
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
BUNDLE_DIR = BASE_DIR
DB_PATH = os.environ.get('RETRODB_DB_PATH', os.path.join(BASE_DIR, "database", "roms.db"))
# Env-overridable so the test suite can be hard-isolated from real scraped media
# (the media-cleanup helpers delete files under these roots). Unset in normal
# use → identical behaviour to before.
STATIC_PATH = os.environ.get('RETRODB_STATIC_PATH', os.path.join(BUNDLE_DIR, "static"))
IMAGE_PATH = os.environ.get('RETRODB_IMAGE_PATH', os.path.join(BASE_DIR, "static", "images"))
# Path defaults (empty — set via Settings page, stored in data/settings.json)
ROM_PATH = ""
ESDE_GAMELISTS_PATH = ""
ESDE_DOWNLOADED_MEDIA_PATH = ""
RPCS3_TROPHY_PATH = ""
# =============================================================================
# API KEY DEFAULTS (empty — set via Settings page, stored in data/scraper_settings.json)
# =============================================================================
THEGAMESDB_API_KEY = ""
THEGAMESDB_PUBLIC_API_KEY = ""
IGDB_CLIENT_ID = ""
IGDB_CLIENT_SECRET = ""
RAWG_API_KEY = ""
RETROACHIEVEMENTS_USERNAME = ""
RETROACHIEVEMENTS_API_KEY = ""
# AI Metadata Scraper (Gemini, OpenAI, or Claude)
AI_METADATA_PROVIDER = "" # "gemini", "openai", or "claude"
AI_GEMINI_API_KEY = ""
AI_OPENAI_API_KEY = ""
AI_CLAUDE_API_KEY = ""
# =============================================================================
# SCRAPER TOGGLES
# =============================================================================
# Enable or disable individual scrapers
# Set to False to disable a scraper (useful if API is down or causing issues)
SCRAPER_ESDE_ENABLED = True # ES-DE local gamelist.xml
SCRAPER_TGDB_ENABLED = True # TheGamesDB
SCRAPER_IGDB_ENABLED = True # IGDB
SCRAPER_RAWG_ENABLED = True # RAWG.io
# =============================================================================
# SERVER CONFIGURATION
# =============================================================================
# Flask server settings (overridable via RETRODB_HOST, PORT / RETRODB_PORT,
# RETRODB_DEBUG)
SERVER_HOST = os.environ.get('RETRODB_HOST', "0.0.0.0")
# Port precedence: PORT -> RETRODB_PORT -> 5000. See server_port.py for why
# the logic lives there and why the two variables have different valid ranges.
#
# A malformed value must NOT explode here: this module is imported by app.py,
# scripts/retrodb_launcher.py and every test. app.py's __main__ re-resolves
# the port, prints a clean message and exits non-zero before anything binds,
# so the fallback below is never what actually gets served.
try:
SERVER_PORT = resolve_server_port()
except ValueError:
SERVER_PORT = DEFAULT_PORT
DEBUG_MODE = os.environ.get('RETRODB_DEBUG', "false").lower() in ('true', '1', 'yes')
# Slow-query threshold (ms). When > 0, services.database logs a WARNING for
# any query/execute call that exceeds the threshold, including the SQL text
# and argument count. 0 (default) disables the check entirely.
# Override via RETRODB_SLOW_QUERY_MS=100 to enable in dev.
try:
SLOW_QUERY_MS = int(os.environ.get('RETRODB_SLOW_QUERY_MS', '0'))
except ValueError:
SLOW_QUERY_MS = 0
# Slow-request threshold (ms). When > 0, app.py logs a WARNING for any HTTP
# request whose handler runs longer than the threshold, including method,
# path, and status code. Pairs with SLOW_QUERY_MS — slow-query catches the
# DB layer; slow-request catches the whole handler (template render, scraper
# fan-out, etc.). Default 500 ms matches "user-perceptible latency"; set to
# 0 to disable. Override via RETRODB_SLOW_REQUEST_MS.
try:
SLOW_REQUEST_MS = int(os.environ.get('RETRODB_SLOW_REQUEST_MS', '500'))
except ValueError:
SLOW_REQUEST_MS = 500
# =============================================================================
# APPLICATION SETTINGS
# =============================================================================
# Application metadata
APP_NAME = "RetroDB"
APP_VERSION = "3.35.3"
APP_LAST_UPDATE = "2026-11-02"
APP_DESCRIPTION = "Retro Gaming ROM Library Manager"
# Supported image extensions for boxart/screenshots
SUPPORTED_IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.webp']
# =============================================================================
# IMAGE STANDARDIZATION (Real-ESRGAN upscaling + Lanczos downscaling)
# =============================================================================
IMAGE_TARGET_HEIGHT = 1080 # Target height for boxart, screenshots, boxart_3d
IMAGE_TARGET_LONGEST_EDGE = 1280 # Target longest edge for controllers (irregular shapes)
IMAGE_UPSCALE_THRESHOLD = 0.80 # Upscale if below 80% of target
IMAGE_DOWNSCALE_THRESHOLD = 1.20 # Downscale if above 120% of target
REALESRGAN_MODEL_NAME = 'RealESRGAN_x4plus'
REALESRGAN_TILE_SIZE = 256
REALESRGAN_MODEL_URL = 'https://huggingface.co/AXERA-TECH/Real-ESRGAN/resolve/main/onnx/realesrgan-x4.onnx'
IMAGE_SKIP_TYPES = ['fanart'] # Image types to skip standardization
# On-ingest image format. 'webp' (default) saves 25-35% vs JPEG at equivalent
# visual quality and is supported by ~97% of browsers in 2026. Set to 'jpeg'
# to preserve the legacy pipeline. Videos, manuals, and GIFs are always kept
# in their original format. Override with RETRODB_IMAGE_FORMAT=jpeg.
IMAGE_FORMAT = os.environ.get('RETRODB_IMAGE_FORMAT', 'webp').lower()
if IMAGE_FORMAT not in ('webp', 'jpeg'):
IMAGE_FORMAT = 'webp'
# Maximum HTTP request body size, in bytes. Werkzeug enforces this when a
# handler first reads the request body — a multipart edit-modal POST with
# boxart + boxart_3d + several screenshots can easily exceed the old 16 MB
# default, and a full-quality game trailer can be hundreds of MB, so this sits
# above MAX_VIDEO_SIZE. Per-file caps in services.game_media_service still apply.
# Override via RETRODB_MAX_UPLOAD_MB.
try:
_max_upload_mb = int(os.environ.get('RETRODB_MAX_UPLOAD_MB', '600'))
except ValueError:
_max_upload_mb = 600
MAX_UPLOAD_BYTES = _max_upload_mb * 1024 * 1024
# Pass 25 — per-operation size and response caps. Werkzeug's
# MAX_CONTENT_LENGTH backstops any HTTP body, but some code paths (scraper
# streaming downloads, SS API JSON, PDF parsing) pre-size their reads from
# the remote response — not the request body — so they need their own caps.
MAX_VIDEO_SIZE = 500 * 1024 * 1024 # 25.6 — per-upload video cap
MAX_MEDIA_DOWNLOAD_BYTES = 50 * 1024 * 1024 # 25.7 — scraper streaming download cap
MAX_API_RESPONSE_BYTES = 10 * 1024 * 1024 # 25.7 — scraper JSON response cap
MUSEUM_UPLOAD_MAX_BYTES = 10 * 1024 * 1024 # 25.4 — museum controller-image cap
CLZ_PDF_MAX_PAGES = 500 # 25.5 — CLZ PDF page-count ceiling
MAX_LIST_ROWS = 500 # 25.8 — list-endpoint row cap
# Pass 45.6 — Pillow decompression-bomb cap. A maliciously-crafted PNG can
# decode to gigabytes of pixel data even if the file itself is small. Caps
# Image.MAX_IMAGE_PIXELS at module-import time in services/image_utils.py
# and services/game_media_service.py. 64 megapixels (~8K × 8K) is well above
# any legitimate game cover or screenshot.
IMAGE_MAX_PIXELS = 64_000_000 # 45.6 — Pillow decompression-bomb cap
# Maximum results to show in search
MAX_SEARCH_RESULTS = 10
# Maximum number of database backups to retain. Older backups beyond this
# count are pruned after each new backup. `pre_restore_*` backups created
# automatically before a restore are exempt and never pruned.
# Override via RETRODB_MAX_BACKUPS.
try:
MAX_BACKUPS = int(os.environ.get('RETRODB_MAX_BACKUPS', '30'))
except ValueError:
MAX_BACKUPS = 30
# How many days of completed/failed/dismissed/cancelled job_queue rows to
# keep. Active states (running, queued, interrupted) are never swept.
# Set to 0 or negative to disable the sweep. Override via
# RETRODB_JOB_HISTORY_RETENTION_DAYS.
try:
JOB_HISTORY_RETENTION_DAYS = int(os.environ.get('RETRODB_JOB_HISTORY_RETENTION_DAYS', '30'))
except ValueError:
JOB_HISTORY_RETENTION_DAYS = 30
# =============================================================================
# SYSTEM NAME MAPPING
# =============================================================================
# Maps ES-DE folder names to full system names
SYSTEM_NAME_MAP = {
# Nintendo
"nes": "Nintendo Entertainment System",
"famicom": "Nintendo Famicom",
"fds": "Famicom Disk System",
"snes": "Super Nintendo Entertainment System",
"sfc": "Super Famicom",
"n64": "Nintendo 64",
"n64dd": "Nintendo 64DD",
"gb": "Game Boy",
"gbc": "Game Boy Color",
"gba": "Game Boy Advance",
"nds": "Nintendo DS",
"n3ds": "Nintendo 3DS",
"gc": "Nintendo GameCube",
"wii": "Nintendo Wii",
"wiiu": "Nintendo Wii U",
"switch": "Nintendo Switch",
"virtualboy": "Virtual Boy",
"pokemini": "Pokemon Mini",
"satellaview": "Satellaview",
"sufami": "SuFami Turbo",
"sgb": "Super Game Boy",
"gameandwatch": "Game & Watch",
# Sony
"psx": "Sony PlayStation",
"ps2": "Sony PlayStation 2",
"ps3": "Sony PlayStation 3",
"ps4": "Sony PlayStation 4",
"ps5": "Sony PlayStation 5",
"psp": "Sony PlayStation Portable",
"psvita": "Sony PlayStation Vita",
# Sega
"genesis": "Sega Genesis",
"megadrive": "Sega Mega Drive",
"megadrivejp": "Sega Mega Drive (Japan)",
"mastersystem": "Sega Master System",
"segacd": "Sega CD",
"sega32x": "Sega 32X",
"sega32xjp": "Sega 32X (Japan)",
"sega32xna": "Sega 32X (North America)",
"saturn": "Sega Saturn",
"saturnjp": "Sega Saturn (Japan)",
"dreamcast": "Sega Dreamcast",
"gamegear": "Sega Game Gear",
"sg-1000": "Sega SG-1000",
"sc-3000": "Sega SC-3000",
"model2": "Sega Model 2",
"model3": "Sega Model 3",
"naomi": "Sega Naomi",
"naomi2": "Sega Naomi 2",
"stv": "Sega Titan Video",
# Microsoft
"xbox": "Microsoft Xbox",
"xbox360": "Microsoft Xbox 360",
"xboxone": "Microsoft Xbox One",
# Atari
"atari2600": "Atari 2600",
"atari5200": "Atari 5200",
"atari7800": "Atari 7800",
"atari800": "Atari 800",
"atarist": "Atari ST",
"atarixe": "Atari XE",
"atarijaguar": "Atari Jaguar",
"atarijaguarcd": "Atari Jaguar CD",
"atarilynx": "Atari Lynx",
# NEC
"pcengine": "PC Engine",
"pcenginecd": "PC Engine CD",
"supergrafx": "PC Engine SuperGrafx",
"tg16": "TurboGrafx-16",
"tg-cd": "TurboGrafx-CD",
"pcfx": "PC-FX",
# SNK
"neogeo": "SNK Neo Geo",
"neogeocd": "SNK Neo Geo CD",
"neogeocdjp": "SNK Neo Geo CD (Japan)",
"ngp": "Neo Geo Pocket",
"ngpc": "Neo Geo Pocket Color",
# Arcade
"arcade": "Arcade",
"mame": "MAME",
"fbneo": "FinalBurn Neo",
"daphne": "Daphne",
"consolearcade": "Console Arcade",
"pcarcade": "PC Arcade",
# Computers
"dos": "MS-DOS",
"pc": "IBM PC",
"windows": "Microsoft Windows",
"windows3x": "Windows 3.x",
"windows9x": "Windows 9x",
"macintosh": "Apple Macintosh",
"apple2": "Apple II",
"apple2gs": "Apple IIGS",
"amiga": "Commodore Amiga",
"amigacd32": "Commodore Amiga CD32",
"cdtv": "Commodore CDTV",
"c64": "Commodore 64",
"vic20": "Commodore VIC-20",
"plus4": "Commodore Plus/4",
"amstradcpc": "Amstrad CPC",
"msx": "MSX",
"msx1": "MSX",
"msx2": "MSX2",
"msxturbor": "MSX Turbo R",
"zxspectrum": "ZX Spectrum",
"zx81": "Sinclair ZX81",
"zxnext": "ZX Spectrum Next",
"electron": "Acorn Electron",
"archimedes": "Acorn Archimedes",
"bbcmicro": "BBC Micro",
"oric": "Oric",
"coco": "TRS-80 Color Computer",
"trs-80": "TRS-80",
"ti99": "Texas Instruments TI-99/4A",
"moto": "Thomson MO/TO",
"to8": "Thomson TO8",
"fm7": "Fujitsu FM-7",
"x1": "Sharp X1",
"x68000": "Sharp X68000",
"pc88": "NEC PC-8801",
"pc98": "NEC PC-9801",
# Other Consoles
"3do": "3DO Interactive Multiplayer",
"colecovision": "ColecoVision",
"intellivision": "Mattel Intellivision",
"vectrex": "Vectrex",
"channelf": "Fairchild Channel F",
"odyssey2": "Magnavox Odyssey 2",
"videopac": "Philips Videopac",
"cdimono1": "Philips CD-i",
"astrocade": "Bally Astrocade",
"astrocde": "Bally Astrocade", # ES-DE folder name
"wonderswan": "Bandai WonderSwan",
"wonderswancolor": "Bandai WonderSwan Color",
"ngage": "Nokia N-Gage",
"palm": "Palm OS",
"gx4000": "Amstrad GX4000",
"supervision": "Watara Supervision",
"gamate": "Bit Corporation Gamate",
"gamecom": "Tiger Game.com",
"supracan": "Funtech Super A'Can",
"crvision": "VTech CreatiVision",
"scv": "Epoch Super Cassette Vision",
"arcadia": "Emerson Arcadia 2001",
"multivision": "Othello Multivision",
"vsmile": "VTech V.Smile",
# GamePark Handhelds
"gp32": "GamePark GP32",
# Modern/Other
"lutro": "Lutro",
"tic80": "TIC-80",
"arduboy": "Arduboy",
"uzebox": "Uzebox",
"vircon32": "Vircon32",
"ports": "Ports",
"zmachine": "Z-Machine",
}
# =============================================================================
# ESRB RATING MAPPING
# =============================================================================
ESRB_RATINGS = {
"EC": {"name": "Early Childhood", "age": "3+", "color": "#00C853"},
"E": {"name": "Everyone", "age": "6+", "color": "#00C853"},
"E10+": {"name": "Everyone 10+", "age": "10+", "color": "#76FF03"},
"T": {"name": "Teen", "age": "13+", "color": "#FFD600"},
"M": {"name": "Mature 17+", "age": "17+", "color": "#FF6D00"},
"AO": {"name": "Adults Only 18+", "age": "18+", "color": "#D50000"},
"RP": {"name": "Rating Pending", "age": "N/A", "color": "#9E9E9E"},
}
# =============================================================================
# PEGI RATING MAPPING
# =============================================================================
PEGI_RATINGS = {
"3": {"name": "PEGI 3", "age": "3+", "color": "#00C853"},
"7": {"name": "PEGI 7", "age": "7+", "color": "#76FF03"},
"12": {"name": "PEGI 12", "age": "12+", "color": "#FFD600"},
"16": {"name": "PEGI 16", "age": "16+", "color": "#FF6D00"},
"18": {"name": "PEGI 18", "age": "18+", "color": "#D50000"},
}
# =============================================================================
# SYSTEM SPECIFICATIONS
# =============================================================================
# Technical specifications for gaming systems
SYSTEM_SPECS = {
# Nintendo
"nes": {
"manufacturer": "Nintendo",
"released": "1983 (JP), 1985 (NA)",
"cpu": "Ricoh 2A03 @ 1.79 MHz",
"ram": "2 KB",
"vram": "2 KB",
"resolution": "256×240",
"colors": "54 colors (25 on screen)",
"sound": "5 channels (2 pulse, 1 triangle, 1 noise, 1 DPCM)",
"media": "Cartridge",
"generation": "3rd Generation",
},
"snes": {
"manufacturer": "Nintendo",
"released": "1990 (JP), 1991 (NA)",
"cpu": "Ricoh 5A22 @ 3.58 MHz",
"ram": "128 KB",
"vram": "64 KB",
"resolution": "256×224 to 512×448",
"colors": "32,768 colors (256 on screen)",
"sound": "Sony SPC700 (8 channels, 16-bit)",
"media": "Cartridge",
"generation": "4th Generation",
},
"n64": {
"manufacturer": "Nintendo",
"released": "1996",
"cpu": "NEC VR4300 @ 93.75 MHz",
"gpu": "Reality Coprocessor @ 62.5 MHz",
"ram": "4 MB (expandable to 8 MB)",
"resolution": "256×224 to 640×480",
"colors": "16.7 million",
"sound": "16-bit stereo",
"media": "Cartridge",
"generation": "5th Generation",
},
"gc": {
"manufacturer": "Nintendo",
"released": "2001",
"cpu": "IBM PowerPC Gekko @ 485 MHz",
"gpu": "ATI Flipper @ 162 MHz",
"ram": "24 MB + 16 MB A-RAM",
"resolution": "Up to 480p",
"colors": "16.7 million",
"sound": "Dolby Pro Logic II",
"media": "Mini DVD",
"generation": "6th Generation",
},
"wii": {
"manufacturer": "Nintendo",
"released": "2006",
"cpu": "IBM Broadway @ 729 MHz",
"gpu": "ATI Hollywood @ 243 MHz",
"ram": "88 MB",
"resolution": "Up to 480p",
"colors": "16.7 million",
"sound": "Dolby Pro Logic II",
"media": "Wii Optical Disc, DVD",
"generation": "7th Generation",
},
"wiiu": {
"manufacturer": "Nintendo",
"released": "2012",
"cpu": "IBM Espresso (PowerPC tri-core) @ 1.24 GHz",
"gpu": "AMD Radeon Latte @ 550 MHz",
"ram": "2 GB DDR3 (1 GB for games)",
"resolution": "Up to 1080p",
"colors": "16.7 million",
"sound": "6-channel PCM linear output",
"media": "Wii U Optical Disc, Wii Optical Disc",
"storage": "8 GB (Basic), 32 GB (Deluxe)",
"generation": "8th Generation",
},
"gb": {
"manufacturer": "Nintendo",
"released": "1989",
"cpu": "Sharp LR35902 @ 4.19 MHz",
"ram": "8 KB",
"vram": "8 KB",
"resolution": "160×144",
"colors": "4 shades of green",
"sound": "4 channels",
"media": "Cartridge",
"generation": "4th Generation (Handheld)",
},
"gbc": {
"manufacturer": "Nintendo",
"released": "1998",
"cpu": "Sharp LR35902 @ 8.39 MHz",
"ram": "32 KB",
"vram": "16 KB",
"resolution": "160×144",
"colors": "32,768 (56 on screen)",
"sound": "4 channels",
"media": "Cartridge",
"generation": "5th Generation (Handheld)",
},
"gba": {
"manufacturer": "Nintendo",
"released": "2001",
"cpu": "ARM7TDMI @ 16.78 MHz",
"ram": "32 KB + 256 KB",
"vram": "96 KB",
"resolution": "240×160",
"colors": "32,768 (511 on screen)",
"sound": "6 channels (4 legacy + 2 PCM)",
"media": "Cartridge",
"generation": "6th Generation (Handheld)",
},
"nds": {
"manufacturer": "Nintendo",
"released": "2004",
"cpu": "ARM9 @ 67 MHz + ARM7 @ 33 MHz",
"ram": "4 MB",
"vram": "656 KB",
"resolution": "256×192 (×2 screens)",
"colors": "262,144",
"sound": "16 channels",
"media": "DS Game Card",
"generation": "7th Generation (Handheld)",
},
"famicom": {
"manufacturer": "Nintendo",
"released": "1983 (JP)",
"cpu": "Ricoh 2A03 @ 1.79 MHz",
"ram": "2 KB",
"vram": "2 KB",
"resolution": "256×240",
"colors": "54 colors (25 on screen)",
"sound": "5 channels (2 pulse, 1 triangle, 1 noise, 1 DPCM)",
"media": "Cartridge",
"generation": "3rd Generation",
},
"fds": {
"manufacturer": "Nintendo",
"released": "1986 (JP)",
"cpu": "Ricoh 2A03 @ 1.79 MHz",
"ram": "32 KB + 8 KB VRAM",
"resolution": "256×240",
"colors": "54 colors (25 on screen)",
"sound": "5 channels + 1 wavetable",
"media": "Famicom Disk (Quick Disk)",
"generation": "3rd Generation",
},
"sfc": {
"manufacturer": "Nintendo",
"released": "1990 (JP)",
"cpu": "Ricoh 5A22 @ 3.58 MHz",
"ram": "128 KB",
"vram": "64 KB",
"resolution": "256×224 to 512×448",
"colors": "32,768 colors (256 on screen)",
"sound": "Sony SPC700 (8 channels, 16-bit)",
"media": "Cartridge",
"generation": "4th Generation",
},
"n64dd": {
"manufacturer": "Nintendo",
"released": "1999 (JP)",
"cpu": "NEC VR4300 @ 93.75 MHz",
"gpu": "Reality Coprocessor @ 62.5 MHz",
"ram": "4 MB (expandable to 8 MB)",
"resolution": "256×224 to 640×480",
"colors": "16.7 million",
"sound": "16-bit stereo",
"media": "Magnetic Disk (64 MB), Cartridge",
"generation": "5th Generation",
},
"n3ds": {
"manufacturer": "Nintendo",
"released": "2011 (JP), 2011 (NA/EU)",
"cpu": "ARM11 MPCore dual-core @ 268 MHz",
"gpu": "DMP PICA200 @ 268 MHz",
"ram": "128 MB (256 MB for New 3DS)",
"resolution": "400×240 (upper, stereoscopic 3D) + 320×240 (lower)",
"colors": "16.7 million",
"sound": "Stereo speakers",
"media": "3DS Game Card, SD Card",
"generation": "8th Generation (Handheld)",
},
"switch": {
"manufacturer": "Nintendo",
"released": "2017",
"cpu": "Nvidia Tegra X1 (ARM Cortex-A57 quad-core) @ 1.02 GHz",
"gpu": "Nvidia Maxwell @ 307.2–768 MHz",
"ram": "4 GB LPDDR4",
"resolution": "1920×1080 (docked), 1280×720 (handheld)",
"colors": "16.7 million",
"sound": "Stereo speakers, 5.1 surround via HDMI",
"media": "Game Card, Digital Download",
"storage": "32 GB / 64 GB (OLED)",
"generation": "8th/9th Generation (Hybrid)",
},
"virtualboy": {
"manufacturer": "Nintendo",
"released": "1995",
"cpu": "NEC V810 @ 20 MHz",
"ram": "1 MB DRAM + 512 KB VRAM",
"resolution": "384×224 (per eye)",
"colors": "4 shades of red",
"sound": "16-bit stereo (6 channels)",
"media": "Cartridge",
"generation": "5th Generation",
},
"pokemini": {
"manufacturer": "Nintendo",
"released": "2001 (JP), 2002 (NA/EU)",
"cpu": "Epson S1C88 @ 4 MHz",
"ram": "4 KB",
"resolution": "96×64",
"colors": "Monochrome",
"sound": "1 channel (piezo speaker)",
"media": "Cartridge",
"generation": "6th Generation (Handheld)",
},
"satellaview": {
"manufacturer": "Nintendo",
"released": "1995 (JP)",
"cpu": "Ricoh 5A22 @ 3.58 MHz (SNES)",
"ram": "128 KB + 1 MB download memory",
"resolution": "256×224 to 512×448",
"colors": "32,768 colors (256 on screen)",
"sound": "Sony SPC700 (8 channels, 16-bit)",
"media": "Satellite Download (St.GIGA)",
"generation": "4th Generation",
},
"sufami": {
"manufacturer": "Bandai / Nintendo",
"released": "1996 (JP)",
"cpu": "Ricoh 5A22 @ 3.58 MHz (SNES)",
"ram": "128 KB",
"resolution": "256×224 to 512×448",
"colors": "32,768 colors (256 on screen)",
"sound": "Sony SPC700 (8 channels, 16-bit)",
"media": "SuFami Turbo Mini-Cartridge",
"generation": "4th Generation",
},
"sgb": {
"manufacturer": "Nintendo",
"released": "1994",
"cpu": "Sharp LR35902 @ 4.19 MHz (via SNES)",
"ram": "8 KB + SNES resources",
"resolution": "160×144 (bordered on TV)",
"colors": "32,768 (SNES palette mapping)",
"sound": "4 channels + SNES SPC700",
"media": "Game Boy Cartridge",
"generation": "4th Generation",
},
"gameandwatch": {
"manufacturer": "Nintendo",
"released": "1980–1991",
"cpu": "Sharp SM5xx series @ ~32 kHz",
"ram": "Minimal (integrated)",
"resolution": "Varies (segmented LCD)",
"colors": "Monochrome (segmented LCD)",
"sound": "Piezo buzzer",
"media": "Built-in",
"generation": "1st/2nd Generation (Handheld)",
},
# Sony
"psx": {
"manufacturer": "Sony",
"released": "1994 (JP), 1995 (NA/EU)",
"cpu": "R3000A @ 33.87 MHz",
"gpu": "Custom @ 53.2 MHz",
"ram": "2 MB + 1 MB VRAM",
"resolution": "256×224 to 640×480",
"colors": "16.7 million",
"sound": "24 channels, 16-bit",
"media": "CD-ROM",
"generation": "5th Generation",
},
"ps2": {
"manufacturer": "Sony",
"released": "2000",
"cpu": "Emotion Engine @ 294.912 MHz",
"gpu": "Graphics Synthesizer @ 147.456 MHz",
"ram": "32 MB RDRAM + 4 MB VRAM",
"resolution": "Up to 1080i",
"colors": "16.7 million",
"sound": "48 channels, SPU2",
"media": "DVD-ROM, CD-ROM",
"generation": "6th Generation",
},
"ps3": {
"manufacturer": "Sony",
"released": "2006",
"cpu": "Cell Broadband Engine @ 3.2 GHz",
"gpu": "RSX Reality Synthesizer @ 550 MHz",
"ram": "256 MB XDR + 256 MB GDDR3",
"resolution": "Up to 1080p",
"colors": "16.7 million",
"sound": "Dolby TrueHD, DTS-HD",
"media": "Blu-ray, DVD, CD",
"generation": "7th Generation",
},
"ps4": {
"manufacturer": "Sony",
"released": "2013",
"cpu": "AMD Jaguar 8-core @ 1.6 GHz",
"gpu": "AMD Radeon @ 800 MHz (1.84 TFLOPS)",
"ram": "8 GB GDDR5",
"resolution": "Up to 1080p (4K video playback)",
"colors": "16.7 million",
"sound": "Dolby TrueHD, DTS-HD Master Audio",
"media": "Blu-ray, DVD",
"storage": "500 GB / 1 TB HDD",
"generation": "8th Generation",
},
"ps5": {
"manufacturer": "Sony",
"released": "2020",
"cpu": "AMD Zen 2 8-core @ 3.5 GHz (variable)",
"gpu": "AMD RDNA 2 @ 2.23 GHz (10.28 TFLOPS)",
"ram": "16 GB GDDR6 (unified)",
"resolution": "Up to 4K @ 120Hz, 8K supported",
"colors": "16.7 million",
"sound": "Tempest 3D AudioTech, Dolby Atmos",
"media": "Ultra HD Blu-ray, Blu-ray, DVD",
"storage": "825 GB custom SSD (667 GB usable)",
"generation": "9th Generation",
},
"psp": {
"manufacturer": "Sony",
"released": "2004 (JP), 2005 (NA/EU)",
"cpu": "MIPS R4000 @ 333 MHz",
"gpu": "Custom @ 166 MHz",
"ram": "32 MB (64 MB on later models)",
"resolution": "480×272",
"colors": "16.7 million",
"sound": "Stereo speakers",
"media": "UMD",
"generation": "7th Generation (Handheld)",
},
"psvita": {
"manufacturer": "Sony",
"released": "2011 (JP), 2012 (NA/EU)",
"cpu": "ARM Cortex-A9 quad-core @ 444 MHz",
"gpu": "PowerVR SGX543MP4+",
"ram": "512 MB",
"resolution": "960×544 (OLED/LCD)",
"colors": "16.7 million",
"sound": "Stereo speakers",
"media": "PS Vita Game Card, Memory Card",
"generation": "8th Generation (Handheld)",
},
# Sega
"mastersystem": {
"manufacturer": "Sega",
"released": "1985 (JP), 1986 (NA)",
"cpu": "Zilog Z80 @ 3.58 MHz",
"ram": "8 KB",
"vram": "16 KB",
"resolution": "256×192",
"colors": "64 (32 on screen)",
"sound": "4 channels (3 tone + 1 noise)",
"media": "Cartridge, Sega Card",
"generation": "3rd Generation",
},
"megadrive": {
"manufacturer": "Sega",
"released": "1988 (JP), 1989 (NA)",
"cpu": "Motorola 68000 @ 7.6 MHz + Z80 @ 3.58 MHz",
"ram": "64 KB + 8 KB",
"vram": "64 KB",
"resolution": "320×224 to 320×448",
"colors": "512 (61 on screen)",
"sound": "Yamaha YM2612 + SN76489",
"media": "Cartridge",
"generation": "4th Generation",
},
"genesis": {
"manufacturer": "Sega",
"released": "1989 (NA)",
"cpu": "Motorola 68000 @ 7.6 MHz + Z80 @ 3.58 MHz",
"ram": "64 KB + 8 KB",
"vram": "64 KB",
"resolution": "320×224 to 320×448",
"colors": "512 (61 on screen)",
"sound": "Yamaha YM2612 + SN76489",
"media": "Cartridge",
"generation": "4th Generation",
},
"segacd": {
"manufacturer": "Sega",
"released": "1991 (JP), 1992 (NA)",
"cpu": "68000 @ 12.5 MHz (+ Genesis CPU)",
"ram": "768 KB",
"vram": "256 KB",
"resolution": "320×224",
"colors": "512",
"sound": "CD-DA + PCM",
"media": "CD-ROM",
"generation": "4th Generation",
},
"sega32x": {
"manufacturer": "Sega",
"released": "1994",
"cpu": "2× Hitachi SH-2 @ 23 MHz",
"ram": "256 KB + 256 KB VRAM",
"vram": "256 KB",
"resolution": "320×224",
"colors": "32,768",
"sound": "PWM",
"media": "Cartridge",
"generation": "4th Generation",
},
"saturn": {
"manufacturer": "Sega",
"released": "1994 (JP), 1995 (NA)",
"cpu": "2× Hitachi SH-2 @ 28.6 MHz",
"gpu": "2× VDP",
"ram": "2 MB + 1.5 MB VRAM",
"resolution": "320×224 to 704×480",
"colors": "16.7 million",
"sound": "Yamaha SCSP (32 channels)",
"media": "CD-ROM",
"generation": "5th Generation",
},
"dreamcast": {
"manufacturer": "Sega",
"released": "1998 (JP), 1999 (NA)",
"cpu": "Hitachi SH-4 @ 200 MHz",
"gpu": "PowerVR2 @ 100 MHz",
"ram": "16 MB + 8 MB VRAM",
"resolution": "Up to 480p",
"colors": "16.7 million",
"sound": "Yamaha AICA (64 channels)",
"media": "GD-ROM",
"generation": "6th Generation",
},
"gamegear": {
"manufacturer": "Sega",
"released": "1990 (JP), 1991 (NA)",
"cpu": "Zilog Z80 @ 3.58 MHz",
"ram": "8 KB",
"vram": "16 KB",
"resolution": "160×144",
"colors": "4,096 (32 on screen)",
"sound": "4 channels",
"media": "Cartridge",
"generation": "4th Generation (Handheld)",
},
"megadrivejp": {
"manufacturer": "Sega",
"released": "1988 (JP)",
"cpu": "Motorola 68000 @ 7.6 MHz + Z80 @ 3.58 MHz",
"ram": "64 KB + 8 KB",
"vram": "64 KB",
"resolution": "320×224 to 320×448",
"colors": "512 (61 on screen)",
"sound": "Yamaha YM2612 + SN76489",
"media": "Cartridge",
"generation": "4th Generation",
},
"sega32xjp": {
"manufacturer": "Sega",
"released": "1994 (JP)",
"cpu": "2× Hitachi SH-2 @ 23 MHz",
"ram": "256 KB + 256 KB VRAM",
"vram": "256 KB",
"resolution": "320×224",
"colors": "32,768",
"sound": "PWM",
"media": "Cartridge",
"generation": "4th Generation",
},
"sega32xna": {
"manufacturer": "Sega",
"released": "1994 (NA)",
"cpu": "2× Hitachi SH-2 @ 23 MHz",
"ram": "256 KB + 256 KB VRAM",
"vram": "256 KB",
"resolution": "320×224",
"colors": "32,768",
"sound": "PWM",
"media": "Cartridge",
"generation": "4th Generation",
},
"saturnjp": {
"manufacturer": "Sega",
"released": "1994 (JP)",
"cpu": "2× Hitachi SH-2 @ 28.6 MHz",
"gpu": "2× VDP",
"ram": "2 MB + 1.5 MB VRAM",
"resolution": "320×224 to 704×480",
"colors": "16.7 million",
"sound": "Yamaha SCSP (32 channels)",
"media": "CD-ROM",
"generation": "5th Generation",
},
"sg-1000": {
"manufacturer": "Sega",
"released": "1983 (JP)",
"cpu": "Zilog Z80 @ 3.58 MHz",
"ram": "1 KB + 16 KB VRAM",
"resolution": "256×192",
"colors": "16",
"sound": "TI SN76489 (3 tone + 1 noise)",
"media": "Cartridge, Sega MyCard",
"generation": "2nd Generation",
},
"sc-3000": {
"manufacturer": "Sega",
"released": "1983 (JP)",
"cpu": "Zilog Z80 @ 3.58 MHz",
"ram": "2 KB (expandable to 32 KB) + 16 KB VRAM",
"resolution": "256×192",
"colors": "16",
"sound": "TI SN76489 (3 tone + 1 noise)",
"media": "Cartridge, Cassette",
"generation": "8-bit Computer",
},
"model2": {
"manufacturer": "Sega",
"released": "1993",
"cpu": "Intel i960 @ 25 MHz + Motorola 68000",
"gpu": "2× Custom DSP (texture-mapped 3D)",
"ram": "8 MB",
"resolution": "496×384",
"colors": "16.7 million",
"sound": "Yamaha SCSP (28 channels)",
"media": "Arcade Board",
"generation": "Arcade",
},
"model3": {
"manufacturer": "Sega",
"released": "1996",
"cpu": "IBM PowerPC 603e @ 66–166 MHz + Motorola 68EC000",
"gpu": "2× Real3D Pro-1000",
"ram": "8 MB + 8 MB VRAM",
"resolution": "496×384",
"colors": "16.7 million",
"sound": "Yamaha SCSP + Motorola 68EC000",
"media": "Arcade Board",
"generation": "Arcade",
},
"naomi": {
"manufacturer": "Sega",
"released": "1998",
"cpu": "Hitachi SH-4 @ 200 MHz",
"gpu": "PowerVR2 @ 100 MHz",
"ram": "32 MB + 16 MB VRAM",
"resolution": "Up to 640×480",
"colors": "16.7 million",
"sound": "Yamaha AICA (64 channels)",
"media": "Cartridge, GD-ROM",
"generation": "Arcade",
},
"naomi2": {
"manufacturer": "Sega",
"released": "2000",
"cpu": "2× Hitachi SH-4 @ 200 MHz",
"gpu": "2× PowerVR2 (ELAN)",
"ram": "32 MB + 32 MB VRAM",
"resolution": "Up to 640×480",
"colors": "16.7 million",
"sound": "Yamaha AICA (64 channels)",
"media": "Cartridge, GD-ROM",
"generation": "Arcade",
},
"stv": {
"manufacturer": "Sega",
"released": "1994",
"cpu": "2× Hitachi SH-2 @ 28.6 MHz",
"gpu": "2× VDP",
"ram": "2 MB + 1.5 MB VRAM",
"resolution": "320×224 to 704×480",
"colors": "16.7 million",
"sound": "Yamaha SCSP (32 channels)",
"media": "Cartridge",
"generation": "Arcade",
},
# Atari
"atari2600": {
"manufacturer": "Atari",
"released": "1977",
"cpu": "MOS 6507 @ 1.19 MHz",
"ram": "128 bytes",