Jump to content

  • Log In with Google      Sign In   
  • Create Account


Original Pac-man documented source code


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
20 replies to this topic

#1 ronenk   Members   -  Reputation: 108

Like
0Likes
Like

Posted 26 October 2011 - 01:02 PM

Hi.



I'm not much of a gameprogrammer, but as many I wanted to be for a very long time. While reading whatit takes to be a game programmer, I believe it was here, someone suggested towrite a Tetris, breakout and Pacman games for starters. I got only as far asTetris (just the game, no welcome screen, save game, players, etc. )

But I always wanted toprogram a Pac-man clone, and after reading on the Internet that Pac-man was a deterministicgame, I wanted to make the EXACT clone.

As I mentioned before,never got to that. But I did get as far as finding the original ROM assembler(US version I believe, not puck-man, but they are pretty much the same)

and tried to find outthe ghosts AI. I must admit I was blown away by the sophistication of this 4kgame.



My humble contributionfor this site, is a commented asm file with what I got (I think it haslike 80% percent of the code, but there bound to be some mistakes, I wastired throughout most of the process)



I hope someone will findit useful, and maybe someone someday will complete the work.



Enjoy.





Sponsor:

#2 way2lazy2care   Members   -  Reputation: 782

Like
0Likes
Like

Posted 26 October 2011 - 01:21 PM

1. Where can we find this?
2. You should submit this somewhere more accessible also. Maybe as an article? It's going to get lost here within a day, and it's fairly cool so put it somewhere where it won't get ignored. :)
3. Kudos.

#3 ronenk   Members   -  Reputation: 108

Like
0Likes
Like

Posted 26 October 2011 - 01:28 PM

1. Where can we find this?
2. You should submit this somewhere more accessible also. Maybe as an article? It's going to get lost here within a day, and it's fairly cool so put it somewhere where it won't get ignored. :)
3. Kudos.




1. My bad. Did not notice it won't upload asm files
2. Thanks for Tip, rookie mistake
3. Thanks

[Download removed by moderator]

#4 TheUnbeliever   Members   -  Reputation: 961

Like
0Likes
Like

Posted 26 October 2011 - 01:47 PM

So this is the assembly source to the original Pac-Man? Why is this not a copyright violation?
[TheUnbeliever]

#5 laztrezort   Members   -  Reputation: 959

Like
0Likes
Like

Posted 26 October 2011 - 02:09 PM

There is also the Pacman Dossier for an exhaustive amount of Pacman info (I believe the author of this also went through the assembly to get some of his information).

p.s. I would definitely check on copyright issues before posting somebody else's code...

#6 ronenk   Members   -  Reputation: 108

Like
0Likes
Like

Posted 26 October 2011 - 02:30 PM

So this is the assembly source to the original Pac-Man? Why is this not a copyright violation?


I found this code on the Internet and matched the assembly against a ROM I found for MAME
I don't know how the other guy got the original ROM to disassemble it, but I don't think running a disassembler on an assembly you've got, is a copyright violation.
Well, at least is sounds right to me.

BTW, google: "pacman original source code" it's the first result

#7 TheUnbeliever   Members   -  Reputation: 961

Like
0Likes
Like

Posted 26 October 2011 - 02:35 PM

I don't know how the other guy got the original ROM to disassemble it, but I don't think running a disassembler on an assembly you've got, is a copyright violation.


It's not. Distributing that assembly online is. "He was doing it too" isn't a valid legal defense. On the other hand, perhaps the copyright owners have put it in the public domain and I don't know this...
[TheUnbeliever]

#8 way2lazy2care   Members   -  Reputation: 782

Like
0Likes
Like

Posted 26 October 2011 - 02:57 PM


2. You should submit this somewhere more accessible also. Maybe as an article? It's going to get lost here within a day, and it's fairly cool so put it somewhere where it won't get ignored. :)

2. Thanks for Tip, rookie mistake


Not a mistake. DEFINITELY CHECK ON COPYRIGHT STUFF. If there are no problems though I'd definitely put it somewhere else also.

#9 MarkS   Prime Members   -  Reputation: 882

Like
0Likes
Like

Posted 26 October 2011 - 10:00 PM

I'm really curious about the purpose of this thread.Posted Image

You post copyrighted code in assembly language for an unspecified processor that is most likely no longer in production and which no development platforms exist in the beginners forum.Posted Image How does this help someone starting out in game development? Posted Image The code cannot be assembled, chances are few visiting this forum understand assembly language enough to even make an educated guess as to what is going on and a Pac Man clone is very simple to make in a higher level language anyway.

It should also be mentioned that Namco enforces their copyrights aggressively.

#10 Gaiiden   Senior Staff   -  Reputation: 5025

Like
3Likes
Like

Posted 27 October 2011 - 05:53 AM

We have nothing against discussing this type of stuff, but as it's been mentioned don't go posting actual code here for people to download. If they go somewhere else to download fine but we can not and will not host copyrighted material in any capacity without proven prior permission of the original copyright holders

Drew Sikora
Executive Producer
GameDev.net


#11 JayFed   Members   -  Reputation: 115

Like
0Likes
Like

Posted 27 October 2011 - 06:30 AM

The Pac-Man ROMs are under copyright to NAMCO Bandai, LTD and are their intellectual property.

#12 ronenk   Members   -  Reputation: 108

Like
0Likes
Like

Posted 27 October 2011 - 06:48 AM

We have nothing against discussing this type of stuff, but as it's been mentioned don't go posting actual code here for people to download. If they go somewhere else to download fine but we can not and will not host copyrighted material in any capacity without proven prior permission of the original copyright holders


First of all I'd like to apologize for what seems quite a mess I've created.
I guess I should have putten more thaught into this.

First of all I guess I should thank you for removing the source. If you could please help me remove it from the Article I published and can not seem to find it now.
My sole purpose was to show the code, with what I think, clear comments to help anyone how wants to create a Pac-man clone.

As far as I know disassembly is not illegal and I found a refernce on the Internet here. As you can see, If done for understanding purposes when no other means are available, it is a legit way. This of course was my only intrest. I want to state here that I am against copyright violations(or any other kind of stealing for that matters), and would never have done this if I thought I was doing wrong.

I guess there are no shortcuts in life, so I'll try to do it right this time.

Again, Thank you

#13 IADaveMark   Moderators   -  Reputation: 2408

Like
2Likes
Like

Posted 27 October 2011 - 10:23 AM

Also see this entry on Pac Man at the History of Game AI project by the AI Game Programmers Guild.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#14 frob   Moderators   -  Reputation: 20363

Like
0Likes
Like

Posted 27 October 2011 - 10:49 AM

My sole purpose was to show the code, with what I think, clear comments to help anyone how wants to create a Pac-man clone.
As far as I know disassembly is not illegal and I found a refernce on the Internet here. As you can see, If done for understanding purposes when no other means are available, it is a legit way.


That legal reference is very location specific and is out of date.


That reference was: (1) in the United States specifically, and (2) from 1992, before DMCA and other major copyright law overhauls in the US, and EUCD and similar laws in the EU.



In some places what you did is just fine. In other places it is a serious civil law violation. In a few places it is a serious criminal law violation.

Posting your own learning is fine. Posting your own descriptions of what it does and how it does it is a great thing.

Posting their source, or their disassembled executable, or their raw executable, are not so great on the world stage.
Check out my personal indie blog at bryanwagstaff.com.

#15 way2lazy2care   Members   -  Reputation: 782

Like
0Likes
Like

Posted 27 October 2011 - 11:06 AM

Just because I was curious and it was relevant:
http://www.copyright.gov/help/faq/faq-duration.html

It looks like in the US the copyright will last for 95 years. So in 2075 you can freely distribute the assembly code to pac man! :D

disclaimer: I am not a lawyer and am not offering this as legal advice.

#16 Gaiiden   Senior Staff   -  Reputation: 5025

Like
0Likes
Like

Posted 28 October 2011 - 06:05 AM

First of all I guess I should thank you for removing the source. If you could please help me remove it from the Article I published and can not seem to find it now.
My sole purpose was to show the code, with what I think, clear comments to help anyone how wants to create a Pac-man clone.

Articles need approval to be published so yours never was. No worries there.

Drew Sikora
Executive Producer
GameDev.net


#17 ronenk   Members   -  Reputation: 108

Like
0Likes
Like

Posted 28 October 2011 - 09:18 PM


Well I tried the legal way. The legal way Su@#

This is the response I got from Namco:


"We appreciate you contacting us regarding your request below and understand that your request is based in a desire to assist in the education of young programmers. Generally this is something that we would like to support, unfortunately wecannot consent, and in fact vigorously object, to the publication of the code to any of our games, in any manner or media whatsoever, including without limitation PAC-MAN. This code is the copyright of NAMCO BANDAI Games and therefore any reprinting or publication by you or any third party violates our exclusive right to exploit and control our copyrights and would subject such publication or any website hosting such content to legal action, including without limitation to a DMCA take down notice and/or a lawsuit for copyright infringement.

We would appreciate it if you would identify the source from which you obtained the code so that we can take appropriate remedial action against any third parties were may already be violating our legal rights.



Thank you for contacting us and I am sorry that we could not be accommodating on this matter. However, we wish you the best of luck in your educational endeavors."



It reminded me why in 9 of 10 cases, I prefer the company of machines over human-beings.

Hopefully Jordan Machner would be less rigid about copyrights.





It looks like in the US the copyright will last for 95 years. So in 2075 you can freely distribute the assembly code to pac man! :D




See you all in 64 years.

Until then, best of luck with your games.






#18 frob   Moderators   -  Reputation: 20363

Like
0Likes
Like

Posted 28 October 2011 - 10:19 PM

Well I tried the legal way. The legal way Su@#
This is the response I got from Namco:

...
It reminded me why in 9 of 10 cases, I prefer the company of machines over human-beings.



Honestly, what did you think would happen?

In some respects it would be like asking the Coca-cola company if you can release the list of their secret ingredients to the public. Obviously they are going to tell you in very clear terms that they object.

You got their source through unauthorized channels, and you know that. You knew, or should have realized if you thought about it, that you had no actual rights to the program.

Yes, the original game is long out of print and unlikely to ever be directly useful in commerce, however, it is their property and (for better or worse) you have no right to it.





What you did was certainly interesting, and you certainly could write up what you learned from the experience. Those things are just fine. Feel free to blog about them. Just don't put up stuff you have no rights to.

Check out my personal indie blog at bryanwagstaff.com.

#19 ronenk   Members   -  Reputation: 108

Like
0Likes
Like

Posted 29 October 2011 - 03:08 AM

In some respects it would be like asking the Coca-cola company if you can release the list of their secret ingredients to the public. Obviously they are going to tell you in very clear terms that they object.

You got their source through unauthorized channels, and you know that. You knew, or should have realized if you thought about it, that you had no actual rights to the program.

Yes, the original game is long out of print and unlikely to ever be directly useful in commerce, however, it is their property and (for better or worse) you have no right to it.





What you did was certainly interesting, and you certainly could write up what you learned from the experience. Those things are just fine. Feel free to blog about them. Just don't put up stuff you have no rights to.


I don't think the CoCa-Cola example is quite the same.
I did get their source on the Internet but did not suspect wrong doing. I also found Doom's source (with what seemed to be an approval from programmer John Carmack)
I guess I am naive that way.

But the thing that upsets me the most is that it's a beautiful piece of code, I'd even go on and say it's art. You'd think I'd be frustrated from the fact I spent so much time on this project, but the truth is I'm frustrated that such a thing is not shown to the public. It should have an honorary place at "Code Hall-Of-Fame".
And last, more than I feel sorry for myself, I feel sorry for the programmers of Namco. I guess they have a lot of money, but much too few recognition if you ask me. At least I got to see that piece of art.

Let me give you what I think is the major example:
The ghosts AI code is not done on the main game loop( sounds weird right ?!) . What I believe happened is that the 3Mhz cpu could not run the entire game loop with AI in the time it took the screen to refresh (1/60 sec) This is common issue for game developers today. You have to do all logic and rendering before next frame refresh. So to overcome that limitation they made an event-queue.
When a ghost has to decide on a new path, they push an event into a queue.
The main thread of PacMan is constantly checking the queue for new events and executes them, while the game loop is being run in the screen refresh interrupt.

THEY PROGRAMMED AN ENTIRE MESSAGE HANDLING QUEUE IN A 4-8K GAME !!!

This program has a small bootstrap, a small event-driven library, and an entire addictive game in it.
Well, I'm getting all emotional for nothing.

If there is something I could wish for all you game programmers or just programmers, is that someday, someone on some part of the world will look through your source and think to himself: "@$#!. That is one fine piece of code!!"

#20 Bladelock   Members   -  Reputation: 123

Like
0Likes
Like

Posted 29 October 2011 - 05:55 AM

Is there any kind of Pac-man game clone that's open-source at least?




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS