Skip to content

Sandroid75/pac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pac

PacMan Arcade Game based on Z80 emulator with original ROMs

A Pac-Man (1980 arcade game) emulator written in C99 with SDL2.

pac demo gif

Features:

  • full emulation
  • sound emulation
  • two-player mode
  • joystick support
  • Multi platform Win & Linux
  • Visual Studio 2022 & VS Code

How to build

You should be able to build it and running:

  • Under Windows use Visual Studio 2022
  • Under Linux use VS Code

How to play

Computer pac
5 or c insert a coin for Player 1
6 or v insert a coin for Player 2
1 start a game (1 player)
2 start a game (2 players)
arrow keys move the player
p pause the emulation
m mute audio
s take a screenshot
t run the board test
space run the emulation at x2 speed
i toggle invincibility mode
GamPad/Joy try it and have fun!

Resources

This is the original repo here: https://github.com/superzazu/pac.git

I didn't want to fork it because of a lot of changes were made and bla bla bla...sorry


Copyleft 1991-2024 by Sandroid75


This code was made by Sandroid75 to illustrate various C language powers. My recommendations for developing robust C code are:

  • first of all read The C Programming Language: ANSI C Version by K&R (C);
  • after read K&R keep always in mind rules and methods;
  • one of the most characteristics and powers of the C is the pointers;
  • pointers are very helpfull and flexibile to write efficient code;
  • pointers can be dangerous for stable code if you forget the rules;
  • if you use pointers for list of datas don't forget to reserve memory;
  • if you use pointers for list of datas don't forget to release memory;
  • write well-formatted code;
  • only good formatted code makes the code readable;
  • good formatting code reduces the risk of errors;
  • good formatting code facilitates the debugging;
  • good formatting code facilitates the maintenences;
  • good formatting code facilitates future implementantions;
  • commenting the code is another good and necessary practice;
  • commenting the code means understanding what you are doing;
  • commenting the code means understanding what you have done;
  • commenting the code is not a waste of time;
  • at the last but not least, remember rules and methods.

Have fun with C programming by Sandroid75 !!!

About

Arcade PacMan based on Z80 ROMs - writed in C99

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages