Article 8071 of rec.games.vectrex: Path: matra.meer.net!news1.best.com!su-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!152.163.199.19!portc03.blue.aol.com!audrey02.news.aol.com!not-for-mail From: chrissalo@aol.com (Chrissalo) Newsgroups: rec.games.vectrex Subject: Help again for DVE :-( Date: 10 Feb 1998 17:29:20 GMT Lines: 213 Message-ID: <19980210172901.MAA07266@ladder02.news.aol.com> NNTP-Posting-Host: ladder02.news.aol.com X-Admin: news@aol.com Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com Xref: matra.meer.net rec.games.vectrex:8071 Hi folks! DOS VECTREX EMULATOR! Integrator time again... The patch for cleansweep and the like is working, but the formular for the integrator is still missing. There defenitly IS some inaccuracy involved. The integrators are based on some capacitor involving ciruit, thus loading is done with some e - function. This is not emulated. The emulator only adds bits and pieces sends them to the integrators, and does so indefinetly without thought. The REAL integrators would reach sooner or later some point of saturation, or at least the integrating would preceed at a slower rate. Right now you can watch many games on the emulator that show that emulation is wrong. Best be seen in POLE POSITION. This IS an integrator problem. Right now positions of exceeding +-68000 are calculated (should only be ranging from about +- 20000). Over three times the values that should be calculated. The problem shows most on games which draw from one side of the screen way to the other, since vectrex game authors took into account what we don't emulate yet... Now... I can't figure out a formular for those integrators that seem to work. Call me dumb, but I don't like e functions either. Below are some notes from the original author of DVE: Naturally I fiddled a lot with this stuff, but I can't get them to work properly. I need a definite formular on how those integrators work, where saturation starts and at what rate... What happens if the sign of the integrating values change... Right now I don't have much time on my hand. You can get your own version of DVE (source) and fiddle and compile and tell your advances. Or/and if you have any good ideas, please be so kind as to share them. In order to compile DVE you need: 1. Watcom C/C++ (I use v10.6) dunno, guess you have to buy it... 2. The source, get it at: http://members.aol.com/vemu2/dvesrc.rar (480.586 bytes) 3. The binary (since it contains additional files needed for working) http://members.aol.com/vemu1/emulator.rar (1.844,653 bytes) http://members.aol.com/vemu2/overlays.rar (800,260 bytes) 4. Seal audio library (I use v1.03): http://www.egerter.com/seal/seal103.zip (dunno) 5. Scitech SVGALIB 6.0 ftp://ftp.cs.tu-berlin.de/pub/msdos/mirrors/ftp.scitechsoft.com/devel/svb ase60.exe (~1.2M) ftp://ftp.cs.tu-berlin.de/pub/msdos/mirrors/ftp.scitechsoft.com/devel/svd em60.exe (~1.2M) ftp://ftp.cs.tu-berlin.de/pub/msdos/mirrors/ftp.scitechsoft.com/devel/svs rc60.exe (~1.2M) Schematics and technical information can be found on many vectrex concerning pages. e.g.: http://www.monmouth.com/~pcjohn. http://website.lineone.net/~raven or the csus ftp site: ftp://ftp.csus.edu/pub/vectrex/ Chris PS. ############## 1 ############## You'd need to model it with either lookup tables or floating point, the problem is the ramp rise profile is dependant on the start position which makes things a little more complex for lookup tables. V =Vstart+( Vtarget-Vstart)* (1-pow(e,-z*Time)) Where e=2.71828 and z is the RC time constant of the circuit (approximates to R/C or C/R (can't remember)). Nice equation eh !! I think I've got it right, I'd need to get some of my old textbooks out to prove it. ############################### ############## 2 ############## Below is my pseudo-code for non-linear intergrators, the exp is inverse exponential, it would be heavy on the computational side multiply/divide..... if (Vdac!=Vlastdac) { time=0; if(Vdac > Vlastdac) sign=1; else sign=-1; Vlastdac=Vdac; Vlastout=Vout Vstep=Vout-Vdac; } else { time+=1; } Vout = Vlastout + (Vstep*(1-exp(-time/RCtimeconst))*sign) ############################### ############## 3 ############## 3) X-Axis integrator, Y-Axis integrators (Analog) Before the input to each integrator is an analog switch, this switch is connected to the RAMP line from the 6522PIA PORT B Bit7. When the switch is closed (RAMP=0) the integrators will integrate the Value presented on the input, when RAMP is negated and the switch opened no integration action can occur and the integrators will hold their current value (see ZERO function). The outputs will follow the following form: ^ | 1 | - --- | ( Vin - Voffset ) dT + Constant CxR | | v For the X,Y integrators R=10000 and C=0.01x10E-6 When we fill the numbers in we get: Vout = - ((10000 x (Vin-Voffset) x Integration time) + Voutstart) Assuming that the full deflection voltages are +5V and -5V we can calculate the beam movement. This is always a relative movement based on the last position of the beam. If you want to be sure of where the beam is make sure you ZERO the integrators first then you can be sure the beam is at 0,0. IntInput = (DAC value - 128) * (10/256) IntOffset = (DAC value - 128) * (10/256) The 10/256 comes from a 10 volt possible swing on the DAC in 256 steps, therefore one step is 10/256 Volts. The -128 turns the DAC value into a plus/minus value. delta X = - ((10000 x (IntInput-IntOffset) x RAMPtime) + X) (or Y) X = X + detla X Assuming the vextrex usable screen area is 8 Inches which converts to 20.3 cm. This is equal to 10 volts of swing. (Note 8 inches is a guess, I dont have a vectrex screen to measure so please correct me if I'm wrong, also these firgures dont take into accound any overdrive of the screen area, and will therefore be slightly incorrect, though by how much I wouldnt like to say) X pos = X (volts) * 2.03 (cm/volt) (or Y) This value is again referenced to the 0,0 point in the centre of the screen. The power supply to the integrator comes from the +5V and -5V analog power supply. No matter how long we integrate for we can never exceed the supply rails, if we integrate for too long then then integrator will saturate. Typicall the integration time, the length of the active RAMP pulse will be quite short, in the order of microseconds or milliseconds. To move over the full range of swing (10volts) it will take ?? Assuming Voffset=0 and Voutstart=0 and no saturation. 10 = - 10000 x -10 X Integration time Integration time = 100us = 0.1ms This is for drawing the largest possible vector, from one side of the screen to the other. Vout = -5V to +5V in both X and Y Axis ############################### Article 6875 of rec.games.vectrex: From: chrissalo@aol.com (Chrissalo) Newsgroups: rec.games.vectrex Subject: DVE update, BUGFIX only... Lines: 31 Message-ID: <1998081914352900.KAA16894@ladder01.news.aol.com> NNTP-Posting-Host: ladder01.news.aol.com X-Admin: news@aol.com Date: 19 Aug 1998 14:35:28 GMT Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com Path: news1.meer.net!nntp2.ba.best.com!news1.best.com!news.maxwell.syr.edu!news-peer.gip.net!news.gsl.net!gip.net!portc01.blue.aol.com!audrey01.news.aol.com!not-for-mail Xref: news1.meer.net rec.games.vectrex:6875 Hi! Finally the promised small update... DVE now has correct joystick axis and the Pole Position bug is history... A small notice for people with non-PC computers... Check out MESS, it has vectrex support now, though Mathis driver does as yet not support lightpen or 3d-imager it is well worth a look... I did a driver for MESS too, it supported the above plus overlays compatible with DVE-overlays. But my driver was not really MESS-conform, since I tweaked the 6809-engine. But talking (writing) vectrex stuff with other people led to the discovery of the Pole Position bug... Bye Chris P.S. Only the "dve_2b_1.zip" file was updated,... the source too is still the same. Even the version number didn't change... http://members.aol.com/vemu1/dve_2b_1.zip