Need help getting my Vmusic2 Module to work on my Poker machine Restoration Project.

Grant666

Member
Hi All

The project I am building is a Poker machine.
I'm restoring an old Aristocrat 5 reel machine to make it work as close to original.
It uses two 28X1's to do this.
One runs the main functions of the machine, the other interrogates the reels once they have stopped spinning, and clac's a payout value.
The problem Im having is with the last bit of the project, which is making it play a nice tune once you win a payout.
Basically, for some reason, once i slot in the Vmusic2 commands into the file, it crashes the word value to 4000 credits ( w6 ), which is not good.
All I can think of is that the hserout command uses the internal words and this is causing the conflict.
I have attached the software, with the tune section right in the last part of the software.
So , i would appreciate someone having a look and let me know what they think.
My software will probably look pretty rough to you guys, but hey, it all works when i dont want to play a tune.....

Regards
Grant666
 

Attachments

hippy

Technical Support
Staff member
Welcome to the PICAXE forum.

The best advice is to strip the program right back to just the VMUSIC2 routines, get those working reliably then add the code back into the main program.

The HSEROUT commands will not be affecting 'w6' or any other variables so it seems to be an issue elsewhere in the program and just coincidence that you noticed that after adding the HSEROUT commands.
 

Technical

Technical Support
Staff member
As you are using hsersetup, you set pins C.6 and C.7 to serial port status, and so when you then read the whole port you may then read rogue bits here in this command:

let b0=pins

In other words bits 6 and/or 7 may then end up with a 1 in them, which will in turn then stop all your if's working as you expect.

It would be far better to isolate out only the 5 lower bits that you actually want, by using this simple change

let b0=pins AND %00011111
 

Grant666

Member
Success !
The software now sits up and happily plays the tunes !
Also, its amazing how far chips have come since the 80's The poker machine ran 2 big boards with multiple processors and ram. Also more boards just to run the credits and meter.
All this replaced with just 2 x 28X1 and 1 x 18X and a serious amount of my time ! hey, we all need a hobby !
Yet again, thanks for the advice.
 
Top