Game development for the ColecoVision and Sega 8-bit systems - - PowerPoint PPT Presentation

game development for the colecovision and sega 8 bit
SMART_READER_LITE
LIVE PREVIEW

Game development for the ColecoVision and Sega 8-bit systems - - PowerPoint PPT Presentation

Game development for the ColecoVision and Sega 8-bit systems Developing for Z80-based video game systems using modern free tools Philipp Klaus Krause February 4, 2018 Table of Contents 1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary Table of


slide-1
SLIDE 1

Game development for the ColecoVision and Sega 8-bit systems

Developing for Z80-based video game systems using modern free tools Philipp Klaus Krause February 4, 2018

slide-2
SLIDE 2

Table of Contents

1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary

slide-3
SLIDE 3

Table of Contents

1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary

slide-4
SLIDE 4

ColecoVision

3.5 Mhz Z80 1 KB RAM TI TMS99xx graphics 16 KB VRAM TI SN76489A sound Readonly cartridges up to 32 KB

slide-5
SLIDE 5

ColecoVision Peripherals

Controllers with joystick, 2-4 fjre buttons, keypad Optional roller controller (trackball) Expansion module #1: Atari adapter Expansion module #2: Steering wheel Expansion module #3: Adam computer Expansion module #3: Super Game Module

slide-6
SLIDE 6

SG-1000

Similar hardware to the ColecoVision But better cartridge port pinout

slide-7
SLIDE 7

Mark III / Master System

3.5 Mhz Z80 8 KB RAM Custom graphics 16 KB VRAM TI SN76489A sound

slide-8
SLIDE 8

Table of Contents

1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary

slide-9
SLIDE 9

What is SDCC?

Standard C compiler (ANSI C89, ISO C90, ISO C99, ISO C11) Freestanding implementation or part of a hosted implementation Supporting tools (assembler, linker, simulator, ...) Works on many host systems (GNU/Linux, Windows, Mac OS, Solaris, NetBSD, FreeBSD, OpenBSD, ...) Targets various 8-bit architectures (MCS51, DS80C390, Z80, Z180, Rabbit 2000, Rabbit 3000A, GBZ80, TLCS-90, HC08, S08, STM8, PIC) Has some unusual optimizations that make sense for these targets (in particular in register allocation)

slide-10
SLIDE 10

Optimal Register Allocation in Polynomial Time

Register allocator based on graph-structure theory Optimal register allocation in polynomial time Flexible through use of cost function Provides substantial improvements in code quality But slow for architectures with many registers Compilation speed / code quality trade-ofg: –max-allocs-per-node

slide-11
SLIDE 11

Regression testing

Regression testing of nightly snapshots ≈ 10000 tests compiled and executed on simulator Tests mostly from fjxed bugs and from GCC Targets architectures: MCS-51, DS390, Z80, Z180, GBZ80, Rabbit 2000, Rabbit 3000A, TLCS-90, HC08, S08, STM8 Host OS: GNU/Linux, Windows, MacOS Host architectures: i386, x86_64, ppc, arm

slide-12
SLIDE 12

LLVM+SDCC

Uses LLVM C front- and backend to produce C code to be compiled with SDCC Code compiled with LLVM+SDCC can be mixed with C code compiled with SDCC Allows languages other than C Enables high-level optimizations Experimental, many issues remaining

slide-13
SLIDE 13

Z88DK

scc compiler based on Small-C zsdcc fork of SDCC. Emphasis on a large set of asm-written libraries for various Z80-based systems

slide-14
SLIDE 14

Table of Contents

1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary

slide-15
SLIDE 15

libcv

Thin hardware abstraction layer Graphics, sound, input, … Supports all ColecoVision peripherals Supports basics of Sega 8-bit systems

slide-16
SLIDE 16

libcvu

Provides common functionality for games Graphics, music, compression, fjxed-point math, …

slide-17
SLIDE 17

Table of Contents

1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary

slide-18
SLIDE 18

Tools

Graphics Music Compression

slide-19
SLIDE 19

Table of Contents

1 Consoles 2 SDCC 3 Library 4 Tools 5 Summary

slide-20
SLIDE 20

Summary

SDCC, a modern compiler targets the Z80 ColecoVision and Sega 8-bit systems have similarities making it easy to write portable games This is supported by the libcv and libcvu libraries