Sunday, 7 February 2010

Maniac Mansion Apple II beeper

Hi, it has been a long time since my last update.
TeenAgent has been implemented into the main trunk of ScummVM, however it is not based upon my engine, instead Vladimir approached the ScummVM team a few months back with a rather complete engine, the engine itself is very tidy and the game is in a completable state.
Congratulations are in order to Vladimir for his incredible work on the game, surpassing any progress I would have been able to make with my poor reversing and coding skills.
The project was great fun and an incredible learning experience while working on it. I would like to thank _sev, Buddha, salty_horse and jvprat for their patience with me while I was learning.
I would also like to thank john_doe for his commits for the music support, as TeenAgent used a strange and new module format for music. I have great respect for everyone who helped me learn. It will not be my last attempt.

I have recently been looking into the code used for Maniac Mansion sound effects on the Apple II.

A little history on the Apple II:
When Maniac Mansion was ported to the Apple II(around the same time as the C64 port) it was seen as a very ugly version, in comparison to the C64 version. It had some graphical issues and didnt include scrolling. Unfortunately the port also suffered in a worse way. While the C64 had the SID chip, an incredible sound chip allowing for some really interesting sound effects, the Apple II port had to make do with a REALLY basic speaker. The Apple II port used the speaker to generate some sound effects such as the character selection 'click'. Unfortunately the speaker could only output a square wave 'click' when the port was addressed(using a 'bit $C030 command) The speaker itself had not options for changing the output or frequency of the output.
This of course left games programmers with very little to play with, many of them came up with intelligent code that would call the speaker multiple times using various loops to 'click' their way into something vaguely audible. Maniac Mansion was no different. Lucasarts created a resource format which consisted of a collection of various bytes which told the code how it should 'click' the speaker.

The resource format is incredibly simple and the resource is simply read in by the code which judges how often and when it should click the speaker.

I am currently about half way through reversing the code(6502 ASM), I have converted about half of it to c++ and am planning on finishing the rest within the next few months(there isnt much, I just do not have much time with university commitments, as it is my final year any external work has to sit on the backburner until I get stuck with my university work :p)

I would like to thank Tobias for his patience with me, he has been especially helpful as he has not ever given me the answer, rather he provides ways for me to find the answer and makes sure I understand it. He has been so helpful in explaining some of the 6502 opcodes and explaining how they were used. I am greatful for his friendship and advice.

Though this code is not very complicated, I am still struggling to understand completely what it does. I am sure this will come to me.

EDIT:
I have documented all I know about the resource format on the ScummVM wiki here : http://wiki.scummvm.org/index.php/SCUMM/V0/Maniac_Mansion_Apple_II

Though this information is pretty irrelevant, since the code is what actually makes sense. The resource is simply a loop controller.

36 comments:

性感的我 said...

Many a little makes a mickle.........................................

電腦 said...

你的部落格不錯哦,我來享受一下~~ ........................................

Anonymous said...

要持續更新下去喲!!期待~~..................................................

慧珊志正 said...

TAHNKS FOR YOUR SHARING~~~VERY NICE.................................................

Anonymous said...

I love readding, and thanks for your artical. ........................................

ParisH_Cadiz0622 said...

very popular to u! ........................................

Anonymous said...

great msg for me, thanks a lot dude˙﹏˙

Anonymous said...

It is no use crying over spilt milk.......................................................

Anonymous said...

與其爭取不可能得到的東西,不如善自珍惜運用自己所擁有的........................................

Anonymous said...

當一個人內心能容納兩樣相互衝突的東西,這個人便開始變得有價值了。...............................................................

Anonymous said...

裸女愛愛無碼尋夢視訊聊天a漫a片a圖一夜情一葉情人妻激情情色寫真美女自拍辣妹自拍正妹自拍美女走光辣妹走光正妹走光脫衣秀脫衣走光色情自慰自拍成人全裸打炮打手槍打飛機巨乳巨奶女優大奶性交

Anonymous said...

檳榔西施摸奶影片,免費A片 okav免費影片 視訊歌唱秀 視訊美女happyhome 免費情人視訊網 d760 go2av亞洲東洋影片 avno1 嘟嘟成年人網 高雄情人援交視訊 免費a片卡通,travian tw4 情人輔助品 成人視訊 免費視訊 ggyy線上漫畫,成人圖片區 色咪咪情色網,視訊熱舞秀 watchshow TV,維納斯成人用品 情色貼圖 免費卡通影片線上觀看 性愛,a漫,線上a片 美女寫真,免費線上Aa片試看 hilive tv免費電影 無碼影片分享 s38想看一下激激 視訊聊天室080 啦咧影音聊天室 正妹視訊ggo 免費視訊,情趣 用品 店 色妹妹視訊高雄援交 免費色情小說一夜情正妹 台辣妹有約sex888movie影城 080苗栗人聊天室 0509 免費視訊聊天秀 台南視訊援交聊天 線上直播解碼片 gogobox論壇免費視訊聊天室 dvd,情人視訊網 show-live視訊聊天 淫蕩人妻,日本美女短片免費觀看 sex520-卡通影片 ut男同志聊天室 s383情色大網咖-免費性愛影片 sex888入口免費性影片觀賞 臺灣情色網 性愛貼圖 辣妹聊天室 90691比基尼辣妹影片 高雄情人視訊交友34c 18成人交友 一葉晴貼圖,黑澀會美眉琳恩 免費a長片,性影片下載 影音聊天室hibb

Anonymous said...

人不能像動物一樣活著,而應該追求知識和美德..................................................

和辛和辛 said...

別人短處,掩蓋幾分;別人過失,包容幾分。......................................................

RochelleP_Higginson瓊文 said...

在你一無所有的時候 是誰在陪伴你 他便是你最重要的人 ............................................................

Anonymous said...

被人揭下面具是一種失敗,自己揭下面具卻是種勝利。..................................................................

義珊 said...

失去金錢的人,失去很多;失去朋友的人,失去更多;失去信心的人,失去所有。..................................................................

Anonymous said...

河水永遠是相同的,可是每一剎那又都是新的。.................................................................

Anonymous said...

幸福不是一切,人還有責任。.................................................................

Anonymous said...

成熟,就是有能力適應生活中的模糊。.................................................................

Anonymous said...

花花公子的責任就是要很平均的愛他認識的每一個女孩子~~我們的責任則在於公平的回應每一篇blog............................................................

Anonymous said...

困難的不在於新概念,而在於逃避舊有的概念。............................................................

Anonymous said...

Quality is better than quantity.............................................................

Anonymous said...

Poverty is stranger to industry.............................................................

Anonymous said...

有夢最美啦~~加油!元氣滿點!..................................................................

Anonymous said...

愛情是一位偉大的導師,教我們重新作人.................................................................

Anonymous said...

He who would climb the ladder must begin at the bottom...................................................

515152 said...

快樂,是享受工作過程的結果..................................................

Anonymous said...

獨居時,要反省自己的過錯;在社會大眾之間,則要忘卻別人的過失。..................................................

Anonymous said...

我們能互相給予的最佳禮物是「真心的關懷」。.................................................

Anonymous said...

河水永遠是相同的,可是每一剎那又都是新的。. . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Anonymous said...

你怎麼能經過一片海,而忘記它的藍?......................................................................

Anonymous said...

男女互悅,未必廝守終生,相愛就是美的。.................................................................

Anonymous said...

你好勁呀! 感謝!!!............................................................

孫邦柔 said...

Learning makes life sweet.......................................................................

Anonymous said...

幸福不是一切,人還有責任。..................................................... ............