Jump to content



Photo
- - - - -

FP and Pinmame - theoretically possible


  • Please log in to reply
192 replies to this topic

#61 lettuce

lettuce

    Pinball Fan

  • Silver Supporter
  • 929 posts

  • Flag: England

  • Favorite Pinball: Monster Bash

Posted 10 January 2011 - 07:30 PM

QUOTE (destruk @ Jan 10 2011, 07:03 PM) <{POST_SNAPBACK}>
QUOTE (lettuce @ Jan 10 2011, 11:56 AM) <{POST_SNAPBACK}>
If everyone thought like 90% of people do on this thread, we wouldnt have any of the great tables that have and are being made in FP now!!!, that in itself is enough reason to carry on your research!!


90%? Can you correct that number so it is more accurate?
Here, I did it for you -

destruk - no
lettuce - yes
bob5453 - yes
sza - yes
rascal - no
wrang - no, but ask = maybe
barrys - yes
1234fd - maybe
highrise - yes
rawd - yes
rehab - yes
blur - yes
stevoz - no
themcd - yes
the trout - yes
light66 - yes
tiltjlp - no
settingsons - yes
greywolf - don't know

yes=12
no=5
maybe=2

That works out to 26% not in favor, and as for Great tables in FP, that is incorrect since none of them use roms now, so - without roms we have great tables in FP which invalidates whatever point you were trying to make to begin with.



Well done in wasting 5 minutes of your life

We have great table in FP now because people use outside programs, for example the model creator, without that alot of the tables that are being made at the moment wouldnt be possible, i never said anything about rom based tables in FP did i!!!!

#62 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 10 January 2011 - 07:36 PM

Doesn't 5/14 = 36% ? Been awhile since I was in school. smile.gif

Edited by Rawd, 10 January 2011 - 07:38 PM.


 


#63 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 10 January 2011 - 07:38 PM

see the thing is, it is as I said all about opinion, there is no real right and wrong. Even if 99 people out of 100 thought it was wrong, that would be 99 opinions.

As for the pushing someone down analogy - I don't think that is a good analogy, because if you push someone you are clearly aware that doing so is likely to cause them actual harm.

I do think it is fair to say that some of the misunderstandings could be attributed to language issues over at GP. But then, if you don't speak a language 100%, then surely you should give people the benefit of the doubt?

Well, anyway, I don't know how far the research will go without some more experienced help anyway... but it's been an interesting debate and everyone should be applauded for how they have expressed their views whilst always respecting others.

#64 destruk

destruk

    VPF Veteran

  • VPF Staff
  • 6,338 posts
  • Location:Colorado Springs, CO

  • Flag: United States of America

  • Favorite Pinball: Ultrapin!



Posted 10 January 2011 - 07:39 PM

QUOTE (Rawd @ Jan 10 2011, 12:36 PM) <{POST_SNAPBACK}>
Doesn't 5/14 = 37% ? Been awhile since I was in school. smile.gif


no, 5 out of 19. or 5/19th.
As for using external programs, even people who use Visual Pinball use external programs. I can understand you are upset Lettuce, but spewing inaccurate radical rhetoric and generalization doesn't serve anyone and basically the floor falls out of any case you do that in.

Build a fire, vipers love the heat.


#65 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 10 January 2011 - 07:44 PM

QUOTE (destruk @ Jan 10 2011, 12:39 PM) <{POST_SNAPBACK}>
QUOTE (Rawd @ Jan 10 2011, 12:36 PM) <{POST_SNAPBACK}>
Doesn't 5/14 = 37% ? Been awhile since I was in school. smile.gif


no, 5 out of 19. or 5/19th.



Damn, you copied my post before I corrected it to 36%.

No wonder I never finished High school.



 


#66 wrang

wrang

    Neophyte

  • Members
  • Pip
  • 6 posts

  • Flag: ---------

  • Favorite Pinball: -

Posted 10 January 2011 - 08:30 PM

QUOTE (highrise @ Jan 10 2011, 07:38 PM) <{POST_SNAPBACK}>
As for the pushing someone down analogy...

Was meant as an extreme case at one end of the spectrum. Anyway....

QUOTE (highrise @ Jan 10 2011, 07:38 PM) <{POST_SNAPBACK}>
I do think it is fair to say that some of the misunderstandings could be attributed to language issues over at GP. But then, if you don't speak a language 100%, then surely you should give people the benefit of the doubt?

You know, I wish that I had been that reasonable every time I went into a discussion on a subject that I was that passionate about and had invested so many hours in it. While also understanding just half of it. I guess you could blame someone in this or that forum for acting less 'ideal', but there sure is a lot of passion for pinball. Unfortunately passion and reason don't always go along together. Yet it is driving the community forward and is creating these great tables.

For the record: I'm a FP guy because I'm a sucker for graphics! Can't help it, it's all about the outside for me! Just kidding. Have had limited experience with the real thing many years ago. Thus not noticing anything that is spoiling my enjoyment.

Edited by wrang, 10 January 2011 - 08:39 PM.


#67 StevOz

StevOz

    Pinball Fan

  • VIP
  • 1,721 posts
  • Location:Nirvana

  • Flag: Australia

  • Favorite Pinball: Scared Stiff



Posted 10 January 2011 - 09:19 PM

Well, I didn't say 'no', although I consider the post to be baiting me to reply, I'll take the bait...I inferred it was a complete waste of your time and talents, whilst also being obviously against the against the wishes of Black. Sure, go for it, to me it seems you at least may derive some enjoyment out of the controversy.

Files I have uploaded here...

 

http://www.vpforums....ownloads&mid=34


logoshort.gif


#68 The Loafer

The Loafer

    Pinball Wizard

  • VIP
  • 3,472 posts
  • Location:Embrun, Ontario, Canada

  • Flag: ---------

  • Favorite Pinball: Superman, Firepower & Tron



Posted 10 January 2011 - 09:31 PM

Pretty interesting project, I've no real opinion, I think the example used about the modeling tool is a perfect reason why this project could be cool but for me, I don't need FP to have rom support to increase my playing time; I have VP for that.

It's good its out in the open though, so if Chris has real issues with it, he has the option of saying "please stop with this project if you want to see work continue" and then it's up to those involved to respect wishes or not.

#69 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 10 January 2011 - 11:08 PM

it's been a good debate so far, however I would politely request that we all limit ourselves to our opinions on the subject, and not to our opinions about other people's opinions. Everyone has a right to think whatever they want.

#70 DedRok_V

DedRok_V

    Crazed Pinball Wizard (Australia's Former #1)

  • Platinum Supporter
  • 2,238 posts
  • Location:Newcastle, Australia

  • Flag: Australia

  • Favorite Pinball: Avengers Blue LE : Judge Dredd : Cosmic Princess

Posted 11 January 2011 - 02:10 AM

I hate to detract from the debate and get back on topic, but,

how's the ideas / work coming along on this?

It was interesting seeing the ideas being put forth .

(forgive me, I'm staying out of this one) whtflag.gif




Blueprint game : up to date list http://www.vpforums....s...st&p=147107

#71 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 11 January 2011 - 02:50 PM

hmmm, well to be honest I'm a bit stuck because I don't really understand how the whole VPM interface works. I have an idea to try hooking up Mata Hari to a bunch of lights in FP just to see if I can get the attract mode running. In principle it should be doable but like I said, I don't know enough. Encouragement I have plenty of, but hard coding help is what is needed.

#72 light66

light66

    Hobbyist

  • Members
  • PipPip
  • 41 posts
  • Location:Denmark

  • Flag: Denmark

  • Favorite Pinball: ATM T2

Posted 12 January 2011 - 09:02 PM

Got it running, sort of, but i can honestly say that my implementation is way to slow.
I think it's the speed of keys that is slowing it all down, but it can't be used to drive a decent light sequence and then the whole point is gone.
At least for me.
So, off to new quests i guess.

light

#73 Popotte

Popotte

    Pinball Fan

  • VIP
  • 813 posts
  • Location:Paris

  • Flag: France

  • Favorite Pinball: World Fair



Posted 12 January 2011 - 09:35 PM

Hello folks! For me, roms support can't be done in an easily way with FP as you have to bypass FP's limitations... But I take advantage of this post to speak about UVP. UVP just works with roms, so no UVP for EM's that it's a pity... My mind: just create a false rom for EM with 126 (for example) switches and lamps. SwitchX_Hit -> LampX_BulbOn SwitchX_Unhit -> LampX.BulbOff (I don't remember how BulbBlink works with VP). Simple rom to code (and to include in VPinMAME 2.4) and you have 128 lamps easy to drive in your code... And now UVP can be use with EM's...
Now, I return to rom with FP. For me, if it's "just" a bypass, I have really no problem with that. It's just like FPM Editor. And, as it's just a bypass, it can't deal with DMD or gas segments...

Les cons ça ose tout. C'est même à ça qu'on les reconnaît.

PopotteDMDredo.gif

 


#74 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 12 January 2011 - 10:21 PM

QUOTE (Popotte @ Jan 12 2011, 02:35 PM) <{POST_SNAPBACK}>
Hello folks! For me, roms support can't be done in an easily way with FP as you have to bypass FP's limitations... But I take advantage of this post to speak about UVP. UVP just works with roms, so no UVP for EM's that it's a pity... My mind: just create a false rom for EM with 126 (for example) switches and lamps. SwitchX_Hit -> LampX_BulbOn SwitchX_Unhit -> LampX.BulbOff (I don't remember how BulbBlink works with VP). Simple rom to code (and to include in VPinMAME 2.4) and you have 128 lamps easy to drive in your code... And now UVP can be use with EM's...
Now, I return to rom with FP. For me, if it's "just" a bypass, I have really no problem with that. It's just like FPM Editor. And, as it's just a bypass, it can't deal with DMD or gas segments...


I have been hoping for the same idea. Is it possible to create a blank rom for this purpose?

(also, how to make the em reels? Does UVP support light images?)

Edited by Rawd, 12 January 2011 - 10:26 PM.


 


#75 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 12 January 2011 - 11:06 PM

well, that is a completely different subject...

I have already built a blank rom system based on XML. It works a lot like ladder logic, you have switches which you can bind to lights, and they can highly customisable behaviours. It can be adapted to work for FP as well. If you are interested, drop me a line. I'd also really like to work with someone that know XML schemas well.

HR

#76 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 13 January 2011 - 02:45 AM

just to add. I realise at such an early stage the system runs quite slowly. However I already found a way to make it work faster, and there will I think be still more ways to improve that. It may be that it is never fast enough to exchange the data for complex roms, but you know, one step at a time. I think just maybe it might be possible to make it work with some of the early solid state machines, such as Mata Hari as I mentioned. Remember that pinmame has its own display data which it can send to a display, it doesn't necessarily need to be within FP.

Edited by highrise, 13 January 2011 - 02:47 AM.


#77 Greywolf

Greywolf

    Perfectionist Bastard

  • VIP
  • 416 posts
  • Location:West Hyperspace, CA

  • Flag: ---------

  • Favorite Pinball: Too many to mention



Posted 13 January 2011 - 06:02 AM

to add my vote: I'm not a huge fan of the possibility of FPinMame. That's the programmer in me talking, though; I feel as though to add ROM support to FP would make table recreation a lot easier...

#78 sza

sza

    Enthusiast

  • Members
  • PipPipPip
  • 75 posts

  • Flag: ---------

  • Favorite Pinball: black hole

Posted 13 January 2011 - 03:45 PM

QUOTE (highrise @ Jan 11 2011, 03:50 PM) <{POST_SNAPBACK}>
hmmm, well to be honest I'm a bit stuck because I don't really understand how the whole VPM interface works. I have an idea to try hooking up Mata Hari to a bunch of lights in FP just to see if I can get the attract mode running. In principle it should be doable but like I said, I don't know enough. Encouragement I have plenty of, but hard coding help is what is needed.




Reading this thread a bit different take on the subject: attract sequence from rom to FP crossed my mind.

I don't know if it might be of any use to anybody:

We can just record the attract sequence using VP to text file and play it out in FP.

It is not as nice as connecting pinmame to FP but works 100% and it is really simple to code.


'In a VP table using the rom:
'Place a timer (35ms let say),

LampTimer.Interval = 35
LampTimer.Enabled = 1


' and a string to record light sequence
Dim Recorded_light_sequence


'Load rom e.g.

LoadVPM "01550000", "Bally.vbs", 3.26
Sub LoadVPM(VPMver, VBSfile, VBSver)
On Error Resume Next
If ScriptEngineMajorVersion <5 Then MsgBox "VB Script Engine 5.0 or higher required":Exit Sub
ExecuteGlobal GetTextFile(VBSfile)
If Err Then MsgBox "Unable to open " & VBSfile & ". Ensure that it is in the same folder as this table. " & vbNewLine & Err.Description:Exit Sub
Set Controller = CreateObject("VPinMAME.Controller")
If Err Then MsgBox "Unable to load VPinMAME." & vbNewLine & Err.Description:Exit Sub
If VPMver>"" Then
If Controller.Version <VPMver Or Err Then MsgBox "This table requires VPinMAME ver " & VPMver & " or higher.":Exit Sub
End If
If VPinMAMEDriverVer <VBSver Or Err Then MsgBox "This table requires " & VBSFile & " & Core.VBS V " & VBSver & " or higher.":Exit Sub
End Sub

'variable to indicate time
dim time_var


'Use the timer to record the light sequence

Sub LampTimer_Timer()
Dim chgLamp, num, chg, ii
chgLamp = Controller.ChangedLamps


'Records the sequence

If Not IsEmpty(chgLamp)Then
Recorded_light_sequence= Recorded_light_sequence & time_var & "," & chgLamp & ","

End If
End Sub



Now add a piece of code to dump the Recorded_light_sequence the string to a textfile or a debug text.

Finally the recorded lights sequence string can be pasted in FP script as an array.
All you need to code in FP is a timer with the same interval as the one in VP to playout the attract sequence from the array.

For example.

With every timer event:
time_var+ 1
loop traverses array string finds if current time_var is on it and turns on the light indicated after it

Playing out can be done more efficiently with few more lines of code and recording could be triggered by a key-press

Edited by sza, 13 January 2011 - 04:10 PM.


#79 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 13 January 2011 - 04:23 PM

funnily enough I was talking to someone about this the other day - it's very similar to what I did with the DMD, recording it and converting it to a DMD font. It's an interesting idea and I'm sure it would work. But as interesting as it is, it's kind of a dead end because it's not 'live'. If we can get an attract mode running 'live' to FP, then there is the potential to build on that to make the whole game run.

The thing is, autoit is all VB based. All of the script above could be converted to run, and sent to FP via keypress.

Edited by highrise, 13 January 2011 - 04:25 PM.


#80 highrise

highrise

    Pinball Fan

  • VIP
  • 589 posts

  • Flag: ---------

  • Favorite Pinball: Scared Stiff



Posted 14 January 2011 - 11:47 PM

hey guys

here is an update:

thanks to sbz, I am now working on getting Mata Hari talking to FP. Chaos has also given me permission to use his Mata Hari table as a test. So with a bit more work, it might not be long before you can see an FP table responding directly to a rom.

Now, about improving speed. I have some ideas about this and I would like some feedback from anyone with experience in this field.

Basically, pinmame sends a list of lights to update. Using the current method, the data sent is too slow - it won't be able handle more than about ten lights per second, which is not quick enough.

So I had an idea, which is to send the data in a more compressed format. The idea is that instead of sending single lights, you send all the 'changed light' data in a single packet. Here is my idea - instead of sending individual light numbers, you send the first light, and from then on you send the difference between that and the next light.

what I'm thinking is to use a timer in FP so it know it is receiving data from AutoIT. That is to say, if it gets two keypress signals which are within a millisecond, it knows this is switch data. We will see if this works, I think it might.

Anyway, what I'm thinking is that perhaps a key signal down and then back up again could be used as the 'handshaking' for the data as well, i.e key 'L' down means 'receive light on data' and then 'key L up' means 'stop receiving light on data'.

So the system would work out the biggest 'gap' between the lamp numbers that need to change, and use that to determine how many bits to use for each 'change'. It would then send that data, which light to start with, and then the differences between each light.

So for example. Let's say pinmame says 'switch on light 2,3,6,7,10,12,13,14,16'

So the biggest gap is between 3 and 6, or 7 and 10, which is 3. So we need two bits to describe the differences.

so what we would do to send this data would be something like this

Key 'L' up, followed by 7 bits for the first light (2, i.e '0000010'), and then three bits to tell the system how many bits it needs for the difference (i.e 0 to 7).

in this case we only need 2 bits to describe the difference between each light. So we could send a data stream like this:

0000010 for 'light 2', followed by '010' meaning 'two bits per difference', followed by '01 11 01 11 10 01 01 10'

this means 'start with 2, add 1, then add 3, then add 1, then add 3, then add 2, then add 1, then add 1, then add 2.'

which would give you 2,3,6,7,10,12,13,14,16 as described.

encoding this gives a data stream of 0000100100111011110010110

if converted to hex, using the previous method, we can send this data in three keypresses. However, if, as I was thinking, we might be able to use base 64 (i.e 64 different key presses), then potentially the information could be sent in only 2 keypresses.

So it means we can send 'light on' data for 9 lights in only four key presses - that is 'start light data + light data + end light data'

What is interesting about this method is that the more lights there are, the better the compression is, because the closer together the numbers are. So even sending, say, 60 lights at once could potentially only require around 8 to ten key presses - which may just be quick enough.

Anyway, I hope that makes sense. It should mean that a lot of light data could be sent quite quickly.

What can I say, I like to play with numbers! If you get what I am blabbing on about, please feel free to comment and suggest improvements.

Edited by highrise, 14 January 2011 - 11:55 PM.