PacMan Arcade Game based on Z80 emulator with original ROMs
A Pac-Man (1980 arcade game) emulator written in C99 with SDL2.
Features:
- full emulation
- sound emulation
- two-player mode
- joystick support
- Multi platform Win & Linux
- Visual Studio 2022 & VS Code
You should be able to build it and running:
- Under Windows use Visual Studio 2022
- Under Linux use VS Code
| 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! |
- https://www.lomont.org/software/games/pacman/PacmanEmulation.pdf
- https://www.arcade-history.com/?n=pac-man-model-932&page=detail&id=1914
- http://www.arcaderestoration.com/memorymap/6365/Pac-Man.aspx
- http://umlautllama.com/projects/pacdocs/
- https://simonowen.com/articles/pacemu/
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
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 !!!
