Impossible Mission

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Log..
Finally managed to eradicate the bug but at the expense of losing the Ethan searching frame. However it still makes sense the way he stands and i am happy with it atm.
Now 2 minutes is lost (as per original game) after using the modem.
Also updated the candy machine graphic.

Currently trying to work out why the furniture is not erased from the screen once the search is over :P

Himem now $9026 (have managed to claw back some memory).

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Not much done last weekend :(

Log
Added a bit of code to redisplay the lifts after exiting the security terminal. However on resetting the lifts it also becomes neccesary to rebuild the lift tables. This is yet to do.

The security terminal is now displaying the terminals Number.

Replaced the large bgbuffer row tables(300 bytes) with code(~64 bytes) which saved a few bytes and doesn't appear to have made any difference to speed.

Memory is now $9008 which is better.

User avatar
Dbug
Site Admin
Posts: 3454
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Twilighte wrote: bgbuffer row tables(300 bytes) with code(~64 bytes) which saved a few bytes and doesn't appear to have made any difference to speed.
Is that the zero page code you were asking about?

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

No, i'll need zero page to hold the routine that scrolls the hires screen when the lift is moving. This is the only area that requires speedup. Currently its a bit slow because its scrolling 33x150 bytes :P

In fact the main areas of the game consist of the engine to control robots and the engine to control Ethan (sound effects are handled solely in the irq routine).

Both of these engines are jumped to on the timeout of DroidDelay and EthanDelay which are counted down in the IRQ routine. This provides very regular movement.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Log..
Sorted a major issue that meant when running right into a room then back out caused the wrong lift shaft to be entered.
Also fixed it so that Ethan now falls when running if no ground beneath him. He'll also not land atop furniture but fall to ground below.

This has allowed me to navigate Ethan through almost the full width of the map (through each room). However still a fair number of bugs.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Not much done last night since i had a party to occupy my time.
However changed character set to old computer format and fixed the deletion of furniture items so that they now disappear from the screen.

However it seems the deletion of said items from the collision map is erasing too much since Ethan promptly fell through the floor! :roll:

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Alot of work done last night and today.
Worked for much of the night on a Mission impossible title screen. I wanted to use a similar screen to that used on the bbc micro with a red edge on white title and a blue background but we all know the the orics graphics are insanely nasty to work with anything freehand. Hence went to bed 5:30 this morning :P
Worked all today on trying to get the original c64 speech converted until i discovered that the memory used by the SID file itself (thats the speech data and code) is 8.4K :(
Sad because i had assigned less than half that figure.
Nevertheless i will still look at the sid with the aim to reduce the size (less speeches) to 4K, redirect sound output to AY and convert to xa code (so it doesn't mess with zero page or memory used in the game.

Other stuff done last night..
Replaced rest of character set with computer style characters. 9 is similar to 4 so will change this at some point.
Eye-open sequence at start of game was too fast so fixed that.
The speaker button did not toggle the speaker tick in the scorepanel.

Whilst those nice pretty screens are very colourful i think you'll agree they can appear mundane after a while and the original game had different colours for each screen. Now i can't manage that but i can and have now set each screen to one of eight colour themes.

So onwards and getting there slowly.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Log..
I spent the day converting the SID Speech code to xa. I then hacked at it to operate on an Oric with AY and then compiled and ran it.

No sound. Oh what a surprise!
But i now realise one of the reasons. It uses the C64's CIA chips hardware Timer facility to control delays between operations together with an IRQ routine.
However whilst the IRQ routine was corrected the Oric or rather the VIA does not contain a timer of the sort required for the Speech code.

It requires a timer that allows the software to select when it should start or stop. This consists of a write in Bit 0 to its control register.

In fact the speech sid uses 4 CIA registers to play with the timer..
CIA2_TimerBLo and CIA2_TimerBHi are stored with $0064 (100 decimal) only. This sets the time period to 100 clock cycles.

CIA2_ICR is the Chips Interrupt Control Register and will reflect different things if Read or Written. Most of the time it is being read in order to detect the timeout but in one place it is being written to with $82 and that value will set Bits 7 and 1 which tells the CIA to generate an NMI interrupt on the timeout of Timer B.
However i think (tho not totally sure) that CIA2 interrupt line is not connected to the 6510 processor. This is why it is being read in the code.

Finally CIA2_CtrlRegB is CIA2's Control Register for Timer B.
In the code it is more often written to than read.
Infact the only time it reads Bit 0 which holds the current state of Timer B (started/stopped).
When it is written it is done with $90 or $91.
Set TOD Alarm, Set flag for 'Force load Timer B' and depending on the "1" start or stop Timer B.

Now how does this equate to us getting it to work on the Oric?
Well i guess we could use VIA Timer 2 to countdown 100 cycles because to do it in software would most likely upset the timing of the speech.
More later..

:P

User avatar
carlsson
Pilot Officer
Posts: 127
Joined: Thu Jan 12, 2006 11:26 pm
Location: Västerås, Sweden

Post by carlsson »

I thought the 6522 VIA and 6526 CIA were quite similar from a programmer's point of view. I know a couple of routines involving timers which should work on both, but perhaps the CIA has more control to offer than the VIA has.
Anders Carlsson

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Log..
Oh dear me, been a while since i fixed stuff in the main code. Some of you may be excused in thinking this game is long overdue an update so here goes.
The blob (as i affectionately call it) is the glowing cursor in the map of rooms. This was corrupting the screen between rooms and after exiting the pocket computer. This is now fixed.
The map of rooms flickered as you moved between rooms. Also fixed.
Some rooms lifts were too close to the edge of the screen which caused Ethan to fall through the gap and reappear several levels up! Fixed
Also some rooms had in excess of 10 lift platforms and the tables only permitted 8. Also fixed. Looking quite nice now though still gazillions to do.

Oh and also creating two spanking new screens for when you win the game (Elvin turning to you in his control room and the final stats screen). Both these screens fit perfectly (well almost) within the game arena boundaries which means i still don't need to store the scorepanel during the display.

I have kind of settled in my mind that the tape version will be missing the Voices so much attributed to the C64 version of the game. However groepaz pointed me to SAM, a nice little synthesised voice synth that is possible on the oric without vast changes so may integrate this in any Disk version.

Memory stands today at 8FEB(out of 9FFF) though not added the 2 new screens mentioned above yet :P

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Log..
Corrected a few rooms furniture and Robot positions. Also when Ethan falls, if he hits furniture Ethan always managed to stand ontop of it. Corrected that now.

Slight problem still with jumping because when the frames finish and the player is still pressing left or right Ethan will run a bit before the system realises is is still in the air!

Still haven't managed to fix search process.
Still haven't got the Simon Computer working.
Still haven't sorted the problem with how to 'Snooze' the robots.
And because of many of these i haven't been able to run through the complete game yet.
Still a few things to sort out before i would consider this game ready for testing proper.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Log..
Finally began work on the searching bit. The code was already done but had more glitches than a B movie.
it was deleting 132 rows of collision map which is strange because there are only 25 rows. With that one fixed i then moved on to randomising the propagation of puzzle pieces in the game, then tested again..
Now hit a strange bug. If i run it the collected puzzle piece is bogus yet if i trap the issue with an infinite loop then step through the code its ok.
However i think i know why.. These issues have usually struck me as a show stopper and can make me very depressed however if the routine was being entered multiple times (should only be accessed once) then this would most likely be the cause. Stepping through the code prevents me from holding controller-up down for more than once.
So lets hope it is the cause.
I also need to display Ethan standing just before Ethan searches because currently the last frame is frozen whilst he's searching. This could be Ethan in mid running frame.

Anyway what should be happening is the furniture is removed from the background, the background is copied over the displayed furniture on screen, the furniture is deleted from the collision map and the hero is then redisplayed. Then either a puzzle piece, lift reset, robot snooze or nothing is awarded to Ethan and momentarily displayed over him. A sound effect is also given and some score awarded and finally the robot snooze or lift reset counter is updated.

User avatar
carlsson
Pilot Officer
Posts: 127
Joined: Thu Jan 12, 2006 11:26 pm
Location: Västerås, Sweden

Post by carlsson »

Twilighte wrote:However groepaz pointed me to SAM, a nice little synthesised voice synth that is possible on the oric without vast changes so may integrate this in any Disk version.
I have been meaning to have a look into SAM for a few years, but was told it may be hard to get to work on something inferior to what it originally ran on: Commodore 64, Atari 800 or Apple II. If you or somebody else reverse engineer SAM, I'd be interested to have a look. I believe it could be made to run on almost any 6502 computer with a sound chip, give or take the amount of work involved.
Anders Carlsson

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

carlsson wrote:I have been meaning to have a look into SAM for a few years, but was told it may be hard to get to work on something inferior to what it originally ran on: Commodore 64, Atari 800 or Apple II.
I disagree, unlike other voice synthesisers that make full use of the specific hardware (SID for example) SAM (like ESS's Voices for Impossible Mission) uses just the 4 bit volume register.
There is some difference in that the SIDs Volume register is linear and AYs is Logarythmic but i don't feel that will make an enormous difference.
The other massive advantage of SAM is that it doesn't make use of multiple interrupts like ESS does. This means (as you point out) it is fairly easy to integrate into any 6502 based system.
carlsson wrote:If you or somebody else reverse engineer SAM, I'd be interested to have a look. I believe it could be made to run on almost any 6502 computer with a sound chip, give or take the amount of work involved.
I am planning to put it into the disk version of IM.
Log...
Added the code to handle Ethan when he falls down a pit. No sfx yet.
Also when he gets electricuted but that bit is not quite working yet.
Also changed the graphics for bonuses that are displayed above Ethan after finding them in furniture.

User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Like Chema atm, you lot may feel IM is not being progressed but it is.. currently concentrating on writing some nice music for it.
Stay tuned

Post Reply