Skip to content

Commit

Permalink
pacemu v1.2
Browse files Browse the repository at this point in the history
Includes updated build system.
  • Loading branch information
simonowen committed Jan 18, 2012
1 parent 48d6fb2 commit 46760ab
Show file tree
Hide file tree
Showing 11 changed files with 155 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
ReadMe.txt -crlf
make.bat -crlf
make.bat-dist -crlf
5 changes: 3 additions & 2 deletions .gitignore
@@ -1,3 +1,4 @@
.*
!.gitignore
dist/
pacemu.dsk
pacemu.sym
pacemu-master.dsk
28 changes: 28 additions & 0 deletions Makefile
@@ -0,0 +1,28 @@
DISK=pacemu.dsk
ROMS=pacman.6e pacman.6f pacman.6h pacman.6j

.PHONY: dist clean

#tiles.bin: tiles.png
# ./png2bin.pl $< 6

#sprites.bin: sprites.png
# ./png2bin.pl $< 12

$(DISK): pacemu.asm tiles.bin sprites.bin $(ROMS)
pyz80.py --exportfile=pacemu.sym pacemu.asm

dist:
rm -rf dist
mkdir dist
cp ReadMe.txt dist/
cp Makefile-dist dist/Makefile
cp make.bat-dist dist/make.bat
./remove_rom.pl
mv disk.base dist/

clean:
rm -f $(DISK) pacemu.sym
# rm -f tiles.bin sprites.bin
rm -f disk.base
rm -rf dist
8 changes: 8 additions & 0 deletions Makefile-dist
@@ -0,0 +1,8 @@
DISK=pacemu.dsk
ROMS=pacman.6e pacman.6f pacman.6h pacman.6j

$(DISK): disk.base $(ROMS)
cat disk.base $(ROMS) > $(DISK)

clean:
rm -f $(DISK)
42 changes: 42 additions & 0 deletions ReadMe.txt
@@ -0,0 +1,42 @@
Pac-Man Emulator for SAM Coupe (v1.2)
-------------------------------------

The Pac-Man ROMs cannot be supplied with this program, so you must provide
your own copies of the following files (from the Midway ROM set):

pacman.6e pacman.6f pacman.6h pacman.6j

Copy them to the same directory as this file, then run make.bat (Windows).
Under Mac/Linux/Un*x, use make to build the final pacemu.dsk disk image,
or combine manually using:

cat disk.base pacman.6[efhj] > pacemu.dsk

Enjoy!

---

Version 1.2 (2012/01/17)
- Improved sprite draw/restore/clip code for extra speed
- Faster tile updates when no sprites are visible
- Added boot-time selection of Hard difficulty
- Added SAM joystick 1 and QAOP input methods
- Improved control handling, favouring latest direction change
- Skip RAM-check for faster startup
- Easier method to add ROMs to form final disk image


Version 1.1a (2004/10/09)
- Added build-time control of tile strip count, for Mayhem accelerator

Version 1.1 (2004/10/01)
- Changed code from Assembly Studio 8x to pyz80 (Comet) format
- Simplified build setup, moving a few things around

Version 1.0 (2004/01/17)
- Initial release

---

Simon Owen
http://simonowen.com/sam/pacemu/
2 changes: 0 additions & 2 deletions m.bat

This file was deleted.

28 changes: 28 additions & 0 deletions make.bat
@@ -0,0 +1,28 @@
@echo off

if "%1"=="clean" goto clean
if "%1"=="dist" goto dist

rem png2bin.pl tiles.png 6
rem png2bin.pl sprites.png 12

pyz80.py --exportfile=pacemu.sym pacemu.asm
goto end

:dist
if not exist dist mkdir dist
copy ReadMe.txt dist\
copy Makefile-dist dist\Makefile
copy make.bat-dist dist\make.bat
remove_rom.pl
move disk.base dist\
goto end

:clean
if exist pacemu.dsk del pacemu.dsk pacemu.sym
rem if exist tiles.bin del tiles.bin sprites.bin
if exist dist\ del dist\Makefile dist\make.bat dist\disk.base
if exist dist\pacemu.dsk del dist\pacemu.dsk
if exist dist\ rmdir dist

:end
30 changes: 30 additions & 0 deletions make.bat-dist
@@ -0,0 +1,30 @@
@echo off

if not exist pacman.6e goto missing
if not exist pacman.6f goto missing
if not exist pacman.6h goto missing
if not exist pacman.6j goto missing
goto got_roms

:missing
echo.
echo ****************************************************************
echo.
echo The Pac-Man ROMs can't be distributed with this program, so you
echo must provide your own copies of:
echo.
echo pacman.6e pacman.6f pacman.6h pacman.6j
echo.
echo Copy them to this directory and re-run to generate: pacemu.dsk
echo.
echo ****************************************************************
echo.
pause
goto end

:got_roms
copy /b disk.base+pacman.6e+pacman.6f+pacman.6h+pacman.6j pacemu.dsk

start pacemu.dsk

:end
Binary file modified pacemu-master.dsk
Binary file not shown.
4 changes: 2 additions & 2 deletions pacemu.asm
@@ -1,6 +1,6 @@
; Pac-Man hardware emulation for the SAM Coupe (v1.1)
; Pac-Man hardware emulation for the SAM Coupe (v1.2)
;
; WWW: http://simonowen.com/sam/pacemu/
; http://simonowen.com/sam/pacemu/

debug: equ 0 ; non-zero to show task time in border
full_redraw: equ 0 ; non-zero for the Mayhem accelerator
Expand Down
11 changes: 11 additions & 0 deletions remove_rom.pl
@@ -0,0 +1,11 @@
#!/usr/bin/perl -w

$file = 'pacemu-master.dsk';
open FILE, "<$file" and binmode FILE or die "$file: $!\n";
read FILE, $data='', -s $file;
close FILE;

$file = 'disk.base';
open FILE, ">$file" and binmode FILE or die "$file: $!\n";
print FILE substr $data, 0, 819200-16384;
close FILE;

0 comments on commit 46760ab

Please sign in to comment.