Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCUMM: Maniac V0: Add support for D64 Demo Disk, Cleanup duplicate 'Talk... #546

Merged
merged 2 commits into from Dec 8, 2014

Conversation

@segrax
Copy link
Member

segrax commented Dec 7, 2014

Located the V0 Demo this morning (its both self running and hands on),

Took some work, but its now working fine... The md5 stuff probably has been done incorrectly :)

The 'V0 Talk Array' has been cleaned it, as we had duplicated at some point

I'm not 100% sure if the data in the array 'maniacDemoResourcesPerFile', is correct...
To get it where it is, i added a room array to the 'extractindex' function (file.cpp), and counted each script/costume/sound that loaded using its room number... but some of the rooms seemed to come up short, and caused a crash when a resource attempted to load.. those rooms where manually increased to fix it...

I've chucked it on my website, so it can be fetched & added to the demo download page
Maniac Mansion C64 Demo

boot_demo

@Kirben
Copy link
Member

Kirben commented Dec 7, 2014

Why are you using VAR_NUM_ACTOR for variable 11? just use the variable 11 directly, since it has another purpose (to detect whether demo mode is interactive or not).

Also I noticed a new opcode (110) is used by script 1, you might want to check what that is for.

@@ -34,8 +34,14 @@ void ScummEngine_v2::readClassicIndexFile() {
_numGlobalObjects = 256;
_numRooms = 55;
_numCostumes = 25;
_numScripts = 160;
_numSounds = 70;
if( _game.features & GF_DEMO ) {

This comment has been minimized.

Copy link
@clone2727

clone2727 Dec 7, 2014

Contributor

Formatting

@@ -1091,8 +1094,13 @@ Common::Error ScummEngine::init() {
const char *tmpBuf1, *tmpBuf2;
assert(_game.id == GID_MANIAC || _game.id == GID_ZAK);
if (_game.id == GID_MANIAC) {
tmpBuf1 = "maniac1.d64";
tmpBuf2 = "maniac2.d64";
if (_game.features & GF_DEMO ) {

This comment has been minimized.

Copy link
@clone2727

clone2727 Dec 7, 2014

Contributor

Formatting

@clone2727
Copy link
Contributor

clone2727 commented Dec 7, 2014

Please regenerate scumm-md5.h properly.

@segrax
Copy link
Member Author

segrax commented Dec 7, 2014

VAR_NUM_ACTOR was used just because it was 11 in V2, at the time i just assumed it was still the same variable... its been changed now to just be 11.

Fixed formatting, and have regenerated the MD5.. i'll take care of the opcode tonight (its located at 0x6E4D in memory if anyone else cares to check it out ;)

@segrax
Copy link
Member Author

segrax commented Dec 8, 2014

I've added support for 'F7 restart', and implemented a function for the 0x6e opcode...
however would it be better if i just use the o_nop function?

Reason is, all the code inside it is hardware related (its also called by some other functions, and exists in the standard v0), essentially it

  1. Waits for final screen raster interrupt (which occurs on raster line 251)
  2. sets the ScreenControlRegister (screen to 25 rows)
  3. turns off all hardware sprites
  4. sets border color to 0
  5. turns sid volume to 0 (this seems to be dependent on if a sound is being played or not.. but i haven't completely analyzed the variables in use to cause this)

causing the opcode to simply 'return' without doing anything in an emulator, appeared to have no effect at all...

@Kirben
Copy link
Member

Kirben commented Dec 8, 2014

No, it is better to have the opcode purpose noted in ScummVM source code, since it is actually used by a script.

Thanks for finding the demo and adding support to ScummVM, merging the changes.

Kirben added a commit that referenced this pull request Dec 8, 2014
SCUMM: Maniac V0: Add support for D64 Demo Disk, Cleanup duplicate 'Talk...
@Kirben Kirben merged commit 6e24e7d into scummvm:master Dec 8, 2014
@segrax
Copy link
Member Author

segrax commented Dec 8, 2014

Your Welcome,

Just incase you didnt see my comment before, the change from char to byte at
https://github.com/scummvm/scummvm/blob/master/engines/scumm/actor.cpp#L1531

causes a problem, as some rooms will have 'A' underflow into the negative, causing issues when compared with the walkbox coordinates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.