Jump to content

MPU4 Character help in MFME


andrew96
 Share

Recommended Posts

Phew - so it is working properly?  I saw your post with the 'Illegal Option' error, and thought I'd have to look into it more!  Cool :)  

Well I guess it still doesn't help yet with making those fake chr chips... but does show another way to run machines with protected lamps without chr chips via patching the Rom :) 

That Yamaha card, it must be doing something funky with the address space like you said... so more to work out for that route!

(As an alternative, I guess a Windows program could be written, to auto-patch roms, given their 8x MFME lamp column numbers.  I may have all that data extracted somewhere from back in the MFME2MAME days actually... so then anyone could burn themselves off a new ROM that doesn't require chr chip).

Edited by johnparker007

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

Yes sorry about that, been doing so much messing I forgot I tried different roms and had not put the dip switches back again! and of course once posted I could not delete the post!

I will run this in the real hyper viper club tomorrow! but I now cannot see why it would not work correctly!!

 

I think it is this causing the problems i was having

clash.thumb.jpg.b860a0139f6dda69ce6aecee44d4538b.jpg

 

I found writing to anything in the range #800 to #8FF would access the chr chip, so I think that's also where the Yamaha sound access would be too, well that's what I think!

Link to comment
Share on other sites

17 minutes ago, andrew96 said:

I found writing to anything in the range #800 to #8FF would access the chr chip, so I think that's also where the Yamaha sound access would be too, well that's what I think!

It sounds very likely :)  Still a bit of a mystery how the real Chr works in that board though ;) 
 

20 minutes ago, andrew96 said:

I will run this in the real hyper viper club tomorrow! but I now cannot see why it would not work correctly!

Cool thanks :)  I'm pretty sure it should work just fine, as it's just pure 6809 code running where I've written the new routine.  Had a dig and found some old MPU4 data, over 200 machines along with their Chr data... popped it on a sheet as a starting point, if a auto-Rom patching tool would be something needed:

https://docs.google.com/spreadsheets/d/1tjRy9ZXgA4bNkLa1IdO_qfQsJzJK7V8xJB_x2EjtovI/edit?usp=sharing

Are there a lot of people with boards/machines missing chr chips though?  I guess as time goes on, perhaps the chr chips wear out... if it can save boards/machines from the tip, that's always a good thing :) 

  • Awesome 1

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

24 minutes ago, andrew96 said:

well this certainly proves the lamp table does not change depending on if it has a sound chip or not! so I think now there is some conflict with my chr chip and the yamaha sound chip!

Great stuff, always good to confirm new info!  :) 

6 minutes ago, andrew96 said:

I have also come across a older rom which has no #802 / #803 references for the lamp table, so it would look like different machines do things differently, to me it would seem one patch doesn't do it all!

Good to know! :)  I have the day off today, so I'm putting together a very basic patching program, that'll just work on those fixed 'signatures' MPU4 roms for now.  I'll stick the code on github once it's working for those basic ROMs, then other coders with more free time can develop it further if they wish.  Not as clean as your replacement Chr chip solution, but it's certainly been an interesting rabbit hole to go down! :) 

  • Awesome 1

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

15 minutes ago, andrew96 said:

People will like your solution better!!

no chip needed!!!👍

 

The patching solution will only work on ROMs that can be patched, it'll need more work to patch ROMs liek the ones you mentioned that don't follow the pattern we've seen so far on Andy Capp and Hyper Viper - your solution should in theory work on all ROMs without having to work out the patching :) 

I think between us we have made some pretty decent progress on these very old protection chips, and fixing the issues they cause :)  

Provisional name for the patch tool is C.R.A.P. (Chr-free Rom Auto Patcher) - I'm so immature lol :) 
image.thumb.png.d4e2ba51fb19e0365e88b4d7268433bb.png

Edited by johnparker007
  • Awesome 2
  • Haha 3

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

What a couple of guys we have here on Desert Island Fruits ;)  Absolutely commendable work.   The auto-patcher will be a godsend to those who rebuild machines only to find the CHR chip is missing.  

Thank you to both of you, two solutions to a very familiar and often project breaking issue ;)

J

Link to comment
Share on other sites

Well after a lot of head scratching I eventually discovered the PAL chip is being accessed slightly differently for the Yamaha card! after logging the differences with the oscilloscope then modifying the code I now have it working on the Yamaha card! it also still works on the basic card too!!

IMG_4249.jpg.e5d7c953f43d713f5b8a786beefacb9a.jpg

 

All lamps in the correct place on the rig!!

progress!!!

that has taken some hours to find!!!

 

  • Like 1
  • Awesome 1
Link to comment
Share on other sites

23 minutes ago, andrew96 said:

Well after a lot of head scratching I eventually discovered the PAL chip is being accessed slightly differently for the Yamaha card! after logging the differences with the oscilloscope then modifying the code I now have it working on the Yamaha card! it also still works on the basic card too!!

IMG_4249.jpg.e5d7c953f43d713f5b8a786beefacb9a.jpg

 

All lamps in the correct place on the rig!!

progress!!!

that has taken some hours to find!!!

 

Wow - that is great news!  Especially that the same replacement Chr chip now works across both gamecards :)  

So can you now can write a Chr replacement chip for Super Hyper Viper that means it can run on the original ROM?  No patching required?

If yes, then I guess next it's time to try to do some more machines!  :)  I guess you can just burn different (unpatched) ROMs to try in your test jig?  (along with matching replacement Chr)...

Edited by johnparker007
  • Like 1

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

yeah the idea hopefully is to add in a character table now I have got to this stage!

I thought I would start with the lamp table first as this proves the code I have so far works and can be seen very visually!

If someone has a patched out character check and checksum then the correct lamp table in a chip is a easy option, but if you can perfect your patching program then I am just doing this for my amusement which is what I started out to do!

  • Like 1
Link to comment
Share on other sites

6 minutes ago, andrew96 said:

yeah the idea hopefully is to add in a character table now I have got to this stage!

I thought I would start with the lamp table first as this proves the code I have so far works and can be seen very visually!

If someone has a patched out character check and checksum then the correct lamp table in a chip is a easy option, but if you can perfect your patching program then I am just doing this for my amusement which is what I started out to do!

Ah right, I'm with ya - so on the Barcrest we saw it just reads protection challenge/response in order through the table, so should hopefully be straightforward?  Definitely phase 2 of your investigations on the horizon! :) 

Once you've done that, then it should mean that no Rom patching is required, since it'll just work exactly like the original Chr - that is super cool!

That patching program - I can't imagine getting all the mpu4 games working very soon, as I need to get back to Arcade Sim, so I won't be able to spend much time on it (it's going to need different patching strategies, I'll have to download some more mpu4 layouts to try)... it's always bloomin' free time that's the problem lol :)  I think you will have your replacement Chr chips perfected way beforehand - I suspect you'll have a few requests! ;) 

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

At the moment with the lamp table I have been lucky the the reset value #00 sent to the chip returns #00 which is also the first lamp column value!

I have to work out now the first #00 write to it  gives the reset #00 then the next #00 onwards gives the lamp table value.

then in the chr table there are 2 writes of several numbers the same, one being #1a so need to distinguish that too, I had thought of counters but only have 2 flip flops left as had to use 6 for the output latches!

 

they crammed a awful lot into that small chip that has little resources!!

so not a easy way forward..... I am not a expert by any means on programmable logic arrays!

 

certainly going to take some time I think

  • Like 1
Link to comment
Share on other sites

13 hours ago, andrew96 said:

At the moment with the lamp table I have been lucky the the reset value #00 sent to the chip returns #00 which is also the first lamp column value!

I have to work out now the first #00 write to it  gives the reset #00 then the next #00 onwards gives the lamp table value.

then in the chr table there are 2 writes of several numbers the same, one being #1a so need to distinguish that too, I had thought of counters but only have 2 flip flops left as had to use 6 for the output latches!

Hiya :)  I had a thought... the 'challenge' values, in RED below (from your posted image earlier), so like:

00, 1a, 04, 10, 18, 0f, 13, 1b, etc......
 

IMG_4171.jpg.c03fb35dc1d8e204a9e33b7acc4e2d5c.jpg

For every ROM, I think they are always the exact same sequence of 64 challenge values?  And they do not have repeats within the table sequence.

So I could be missing the point, as I've not ever done any programmable logic array coding ;) ... but if I had to make that smaller, since I know it's always working through the table in order, I'd only advance, when the challenge value received is different to the previous one...

So if it writes:   00, 1a, 1a, 1a, 04, 04, 04, 04, 10, 10, 18, 18, 18, 18...

I'd just return:

Response[0],Response[1],Response[1],Response[1],Response[2],Response[2],Response[2],Response[2],Response[3],Response[3]... etc

That said, you'd still need 64 bytes storage for your responses... but then single index to the current point in the 'Response' table.  Adn that index only increments when the challenge does not equal the previously received challenge.

Apologies if this is wildly off how you are implementing this! :)  I just mean that you don't have to store the 64x challenges, only the 64x responses (since it always works through the table in order, even with repeats of challenges)... might save some space.

[ Arcade Simulator ] Pre-alpha installer: http://arcadesimulator.net  |  Known Issues: https://tinyurl.com/yz4uom2e  |  Donation info: https://tinyurl.com/yzvgl4xo
[ Community Drive ] The drive: http://tinyurl.com/yckze665
[ Fruit Machine Database ] Initial google sheets (WIP): https://tinyurl.com/2c5znxzz
[ Fruit Machine ROM  Archive ] The archive: https://tinyurl.com/3jhzbueb

[ MFME Launch ] Source code: https://github.com/johnparker007/MFMELaunch
[ Oasis ] Source code: https://github.com/johnparker007/Oasis
[ Sound ROM Editor ] Source code: https://github.com/johnparker007/SoundRomEditor

Link to comment
Share on other sites

I can see what you mean, but it is only logic gates in these chips, logic gates and 8 flip flops, it cannot process like a microprocessor, so I can only use what its input is to generate a output, Yes a sequence out would be good, but I don't have the luxury of using flip flops as a 0 to 64 counter as only have 2 left!

even now with the first #00 in the reply is #00 , so thought if I use the inverted flip flop outputs and then AND them, this will produce a 1 so the next in the table for column 1 will be #80  when #00 is re-applied! 

brill I thought! but wincupl wont let me use a 6 input a AND gate on the flip flops /Q outputs!  I have for at least 2 hours been trying to find a way around that simple step!!!! 

I am not entirely sure there is enough resources to hold a 64 character stream, no one knows but it is presumed there is some key and with flip flips and logic it manages to come up with a pattern of numbers in the right order. If there is a initial seed for this no one knows it!

  • Like 1
Link to comment
Share on other sites

I have 0 experience of using PAL /GAL chips so am making it up as I go along to fit what is needed

I dabbled a few years back with a simple address in... data out table and one for a gals panic by again looking at the logic in / out then using wincupl to make one up!

but as for doing anything like this with just simple logic.... no experience at all! I expect barcrest programmers used all the tricks in the book to squeeze it all in!!! I can't!! lol

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...