It is currently Fri Jul 19, 2019 1:56 pm


All times are UTC [ DST ]




Post new topic Reply to topic  [ 20 posts ] 
Author Message
 Post subject: StarRider:I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Mon Oct 21, 2013 3:11 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Hello:
First at all: sorry my bad english. I'm Spanish, and my english is very bad, needs help from Google traslate and Disctionary. Never learn Englisn in school.

My name is Joseba Epalza, and i'm emulators developer from several years (about 1996), in past, did make Mr. Do's emulators saga in MSDOS, or LadyBug or City Connection, or even in Mame with my SpaceBall emulator.
More recently, did make Thomson M05 emulator in full basic source code (freebasic).

My goal today, is to make Star Rider Emulator (was one of my favourities games in the past). About one year ago, began to make StarRider emulator in Freebasic with my 6809 emulator in Basic. Make a huge advance in emulation, but several problems, (Matt, you must know this problems :wink: ) stopped me.
Video sincronization with PIA is very difficult, and to read all datas from footprint video is very complex. But, maybe, all together, joined in a group, was be able to get full data decoded.

In youtuve, uploaded sevearl videos, with my advance:



This is very interesting, because is for get data from footprint of video:


Does has any information about datas from video?

In my research, look for datas "frames number", "gravity on curves", "curve left or right" or "grade of curve".

This is an example of datas obtained from video:
Code:
227, 171, 16, 128, 128, 129, 128, 128, 128, 129, 129, 69, 139, 0, 33, 129, 116, 3, 152, 12, 32, 151, 128, 84, 255, 69, 253, 131, 245, 111, 232, 191, 128, 255, 2, 254, 133, 248, 23, 240, 95, 192...

226, 171, 17, 128, 128, 129, 128, 128, 128, 129, 129, 255, 139, 0, 33, 129, 116, 3, 152, 12, 32, 151, 128, 84, 128, 70, 1, 132, 245, 239, 231, 191, 128, 255, 2, 254, 133, 248, 23, 240, 95, 0...

225, 171, 18, 128, 128, 129, 128, 128, 128, 129, 129, 6, 139, 0, 33, 129, 116, 3, 152, 12, 32, 151, 128, 84, 255, 69, 253, 131, 245, 111, 231, 191, 128, 255, 2, 254, 133, 248, 23, 240, 95, 0...


Note then first number in sequence: 227, 226, 225, etc is a downcounter.


edit: sorry, videos from youtuve has in error... :( (maybe faulty http?)


Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Tue Oct 22, 2013 4:18 am 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Well, new information about emulator.
In the last months, did try to get all information about StarRider, just like videos, pictures (pcb), manuals, schematics, etc, in order to try to understand hardware.
In my research, nothing about footprint on video. :(
But, did make a very dirty Basic Program in order to get datas from video. With FreeBasic, did make video renderer (XVID) to get video on screen, and decode footprint in bytes (or bits).
Foot print seems than are 14 rows of 3 groups of bytes, total 42 bytes. If you see picture, will see from left to right, three groups of bars, duplicated on two rows (negative and positive, or white and black). This rows seems like one on one byte, one positive, and then, one negative, this is like 1 and then 254, o 128 and then 127 (binary 00000001 to 11111110 or 10000000 to 0111111), inverse one from the other. This pattern seems like checksum in order to avoid errors. If you read one of them in positive, then, negative is complement from the one.
In total, 48 bars (24 positives, and 24 negatives) for 24 bytes. 24 bytes/3 groups=8bytes for group.

Bar graph begin in 57pixel position, and then goes along 590pixels of width. In height are 28pixels.

In total, making calculation, we have 14 bytes of data heigth multiplicated by three groups of them, total 42 bytes of data decoded.

Star rider laser disc module, read this data in order to get several information about type of track, like difficult of curve, acceleration, type of track, gravity, score, obstacles, or several more.

In my little poor investigation, found datas for type of road, speed, gravity on curve, counter to the next track, and if type of curve (linear, left or rigth), but nothing more :cry:

On this initial picture, you see the first three blocks of datas. Just the first 3 frames of video, with decoded bytes. (unknown)
Attachment:
datos-iniciales.jpg
datos-iniciales.jpg [ 122.45 KiB | Viewed 23238 times ]


On this picture (sorry, spanish only, and very dirty, is just for me), datas are decoded.
You see blue lines on counter for long of track, green for type of track yellow for gravity on curve (or inertia), red for down counter to zero to maybe stone in middle of track, and then you see spanish text "curvatura" (curvature) than means left, right or rect. ("IZQ" in the picture for "izquierda" or "left"). Three blocks of data (white, gray, white).
Attachment:
ya_conocidos.jpg
ya_conocidos.jpg [ 146.02 KiB | Viewed 23238 times ]


In short, tray to make EXE program for you see frames one by one, in order to try to get more datas.

Again one more time, sorry for my bad english. IS very difficult to think in spanish, and then write in english with google traslate, and correct it with dictionary.


Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Tue Oct 22, 2013 4:42 am 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
More technical info, about video:
Video format (original), is 4:3 format (not 16:9), but only for menus or initial demo. But, when the game begins, uppper part of video, duplicated by two width, in order to recreate ficticial left and right vision on curves. Lower part remains original, in order to get frames, score, datas or behind look (mirror back).

Initial video, on menu:
Attachment:
inicial.jpg
inicial.jpg [ 26.89 KiB | Viewed 23238 times ]



Into the game, when you first get the dome (with deformated oval world):
Attachment:
sin_ampliar.jpg
sin_ampliar.jpg [ 31.94 KiB | Viewed 23238 times ]



Ampliated by two video, in 16:9 format, like in the real game (world in dome, now is circle):
Attachment:
ampliado_x2.jpg
ampliado_x2.jpg [ 51.45 KiB | Viewed 23238 times ]


LaserDisc of StarRider make two "speeds" in order to create low and high speed motors.
Video lenght is only 17:49minutes in high speed, but in low is 35minutes aprox.


Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Tue Oct 22, 2013 5:10 am 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
And then...... the first episode to try to get datas.
Download my exe and the reduced version of laserdisc video for starrider and run it.

(sorry, forum engine don't let me to put full http access)
Code:
docs dot
google dot
com
/ file / d / 0ByvCAHD9EnZhWDV4Mnk4cE5XeXM


If EXE crashed, is about error on codecs, then, you need to get correcto xvid codecs (maybe "Xvid-1.3.2-20110601.exe").

Keys in my program:
"1" back one frame (take advice, if you get "-1" frame, program crashed)
"2" forward one frame
"3" go to 'n' frame
"enter" full speed video
"space" stop video

The program generate one TXT file named "salida.txt" with all obtained data for all process. This file is in CSV format, to get it into XLS file and see it in good view.


Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Wed Oct 23, 2013 9:35 pm 
DAPHNE Platinum Donator
DAPHNE Platinum Donator
User avatar

Joined: Fri Jun 01, 2001 1:00 am
Posts: 115
Location: Italy
Hi Joseba,
I downloaded your program. I will give it a try. Keep up the good work, finally someone else working on emulation of arcade laserdisc games.
Congrats about the job done so far.

_________________
Matteo


Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Thu Oct 24, 2013 9:29 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Thanks. :oops:
It's very important, to try decode all datas from footprint video. Is like a detective game: searching for all video, looking for patterns like counters, or obstacles or anything. Looking video over on over times, meybe any data coming into your mind. ;-)


Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Thu Oct 24, 2013 9:36 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Drop here all my investigation about StarRider internals. I'm sure, that so many errors in my information, but, at least, is a good start point to make emulator:
(sorry, i'm very sorry, only in spanish. If you need any part traslated, said me, to try to traslate it to english)

Code:

       ROMS:
       // 08 EN LA 0000-3fff 16K
       // 15 EN LA 0000-3fff 16K  <-- paginada CON LA 08
       // 26 EN LA 4000-7fff 16K
       // 45 EN LA 8000-9fff 08K  JUNTAS LA 08+26+45 DE 0000 A A000
       // RAM DE A000 A dfff      RAM
       // 52 EN LA E000-ffff 08K  ES LA PRINCIPAL

quizas la RAM es solo de A000 a C000 (8k) y de D000-E000 (4k), total 12k
PERO hay otros 2k de ampliacion no instalados, POR LO QUE SOLO HAY 10K
CREO QUE solo de A000-A800, A800-B000, B000-B800 (2+2+2) y de D000-D800, D800-DFFF (2+2)
y entre la B800-C000 faltan 2k que no existen

LOS TEXTOS SE GUARDAN EN ROM RESTANDO 54 AL CARACTER.
ADEMAS, AL ULTIMO DE LA CADENA
UNA VEZ RESTADO 54, SE LE SUMA 128 (BIT7)
POR EJEMPLO "CONGRATULATIONS" APARECE EN ROM COMO
"0D 19 18 11 1C 0B 1E 1F 16 0B 1E 13 19 18 9D" y el 9D final es la "S" con el bit 7 activo

los textos de fases y testeos de roms estan en la rom R32U26

EL VIDEO ES DE 720X480, PERO DEBERIA SER DE 1440X480 (x2 EN HORIZONTAL) SOLO EN LA ZONA VISIBLE
DEL CUADRO DE JUEGO. LA PARTE INFERIOR NO VISIBLE (RETROVISOR Y MARCADORES) SIGUE SIENDO 720X480
DEBEMOS ENTONCES, HACER UN ZOOM x2 DE LA ZONA SUPERIOR SOLO.
LA ZONA DE SINCRONIZACION DE DATOS, ES DE 48 FILAS ALTERNANDO BLANCO Y NEGRO CON 14 BITS CADA UNA
EMPIEZA SIEMPRE CON DOS BLANCAS JUNTAS QUE NO SE TOCAN, COMO SI SIEMPRE FUERAN "0+0" O "FF+FF"
Y ACABA CON UNA SIEMPRE NEGRA QUE PUEDE SER "0" O "FF"
ADEMAS, SON UNA INVERSA DE LA OTRO: SI UNA FILA ES NEGRA, LA SIGUIENTE BLANCA (O SEA, XOR'EADA 255)
SI UNA FILA ES 1, LA ADYACENTE ES 254, Y ASI SIRVE COMO CHECKING
DE ESE MODO, EN REALIDAD SOLO TENEMOS 24 FILAS*14BITS (LOS 14 BITS AUN NO SE COMO VAN)


======================
0000-9FFF --> VRAM
A000-BFFF --> RAM (PERO PODRIA SER SOLO A000-B800)
----------------------
C800-CBFF --> I/O:

C000-C0FF --> QUIZAS LAS PRAM DE COLORES (256)
C800      --> CAMBIA ENTRE RAM Y ROM (paginacion???)
              0= modo normal, con ROMS y RAMS propias de la CPU
              1= habilita las ROMS del PVG dentro de 0000-8000 para su testeo (la de TEXTOS es fija en la C000)
              2= habilita la RAM del PVG dentro de 0000-A000
              4= mapea los bancos de ROM 0000-4000 y 4000-8000 de la CPU, con las ROMS adyacentes
CB00-CB02 --> ????? (SON TAMBIEN ENTRADAS, ADEMAS DE SALIDAS)
CB90      --> FIELD
CBA0      --> VERTICAL CONTROL: A0 NECESITA ser "0" PARA AVANZAR
CBA1-CBA3 --> ????
CBB0      --> DMA ??? activa el acceso directo a la RAM de video
CBB8-CBBF --> BLITTER : si se escribe en CBB8, se procede a dibujar el BLITTER
CBC0      --> BANCO de ROMS a seleccionar: de 0 a 3F. Si es FF leemos de VRAM, en lugar de ROM
CBC1      --> ???? se pone al cero al inicio
CBD0      --> EXPANDER + BACKGROUND ON/OFF --> "0=ON" "3=OFF" ambos a lavez, creo que no hay mas formas
CBE0      --> SELECCIONA PALETA DE COLORES (ESCRIBE MUCHAS VECES UN "1")

EL VGG EMPLEA LAS A0-A6 PARA CONTROLAR UN "6810", QUE ES UNA MEMORIA DE 128 BYTES!!!!!!!!!!!!

---------------------
CC00-EFFF --> CMOS



=======================
C980-C983 --> PIA-1 en CPU_Board (la de sonido es el segundo grupo, o sea, 82-83, el "B")
C984-C987 --> PIA-2 en CPU_Board
CPU PRINCIPAL (2 PIA)
---------------------
PIA-1A: ..............C980-1...................
   0 AUTO-UP
   1 ADVANCE
   2 SCORE-RESET
   3 LEFT-COIN
   4 CENTER-COIN
   5 RIGHT-COIN
   6 SLAM-SWITCH (TILT)
   7 MEM PROT
   CA1 NO SE DONDE VA
   CA2 NO SE DONDE VA

PIA-1B: ...............C982-3.............................
   0-7 VA AL MODULO DE SONIDO
   CB1 VA EN "SND ACK"
   CB2 VA EN "CPU INT" (LA CPU 6809 DEL MODULO DE SONIOD)

....................

PIA-2A: ................C984-5.....................
   0 STEER 1 --> los STEER son los 6 optos que leen el manillar
   1 STEER 2
   2 STEER 3
   3 STEER 4
   4 STEER 5
   5 STEER 6
   6 PLAYER START 1
   7 PLAYER START 2
   CA1 VA A GND
   CA2 VA A "SND RESET" (¿SOLO SALIDA HACIA EL MODULO?)
   

PIA-2B: ................C986-7........................
   0 POWER 1 --> POWER son 4 optos
   1 POWER 2
   2 POWER 3
   3 POWER 4
   4 BRAKE 1 --> BRAKE y TURBO son 3 optos
   5 BRAKE 2
   6 TURBO
   7 GEAR HI/LOW
   CB1 VA A GND
   CB2 CREO QUE ESTA SI CONECTAR


SONIDO (2 PIA Y UN 6809)
----------------------------
PIA-3
PIA-4


La teoria dice, que no alcanzo esta PIA, por que la controla su propio 6809 y algo del VGG
pero no la CPU principal
PIF (PROCESS INTERFACE) (1 PIA) CONTROLA EL LASERDISC A CONTROL REMOTO
-------------------------------
PUERTO B
   0 JMP TRIGGER
   1 SCANC
   2 CONTROL JMP TRIGGER / SCANC (ENTRADAS 0 Y 1)
   3 CONTROL REMOTE CONTROL (ENTRADA 4)
   4 REMOTE CONTROL
   5 STAND BY
   6 ODD/EVEN (ENTRADA)
   7 VREF??? (VIDEO REFF???) (ENTRADA)
   CB1 VIDEO SQUELTCH (ENTRADA)
   CB2 DISPLAY ON/OFF (SALIDA)

PUERTO A
   CONEXION CON EL "VGG"
   CA1 Y CA2 VAN A LOS CB1-CB2 DEL "PIF"

   
----------------------------------------
PIA del Expander, que controla el LD PIF
========================
CB80-CB83 --> PIA-x en ... 81, SI ES CERO, NO AVANZA, 83, PARECE UNA IRQ IMPORTANTE (quizas 82-83 sean del Laserdisc)

VGG VIDEO GRAPHICS GENERATOR (1 PIA)  CONTROLA EL "EXPANDER" Y EL BLITTER GRAFICO
---------------------------
CONTROLADO MEDIANTE "CB80-3"
PUERTO A --> CB80-1
   CONTROLA EL "EXPANDER"
   CA1 VA A "HALT-CPU"
   CA2 VA A "EXPANDER"

PUERTO B --> CB82-3
   CONEXION CON EL "PIF"
   LOS CB1 Y CB2 VAN A LOS CA1-CA2 DEL "PIF"

EXPANDER
--------
VA CONECTADO AL PUERTO "A" DE LA PIA DEL "VGG"
Y SE ENCARGA DE EXPANDIR LA IMAGEN A 2x DE ANCHO Y DESPLAZARLA A UN LADO U OTRO



Top
Offline Profile  
 
 Post subject: Re: I'm trying to make LaserDisc emulator in FreeBasic
PostPosted: Sun Nov 17, 2013 5:53 pm 
Registered User
Registered  User
User avatar

Joined: Fri Dec 04, 2009 4:26 pm
Posts: 30
Hello jepalza. I've translated your notes for those who can't read Spanish. I can see you've done a lot of work with this. Congratulations on your work so far. I hope your call for help brings you results (no matter how small). Would be a shame to let this thread die ignored. Maybe someone can move it to another forum so it won't get deleted. Happy Holidays!

Code:
       ROMS:
       // 08 in the range of 0000-3fff 16K
       // 15 in the range of 0000-3fff 16K  <-- page with the 08
       // 26 in the range of 4000-7fff 16K
       // 45 in the range of 8000-9fff 08K  JOINS 08+26+45 from  0000 to A000
       // RAM within A000-dfff      RAM
       // 52 within E000-ffff 08K  is the main range

Maybe the RAM is only from A000-C000 (8k) and D000-E000 (4k) for a 12k total
but there are other 2k expansions not installed. Only 10K exist.
I *think* the following do not exist:

A000-A800, A800-B000, B000-B800 (2+2+2) and D000-D800, D800-DFFF (2+2)
Between B800-C000 there are 2k which are non existent.

The text is saved in the ROM deducting 54 to the character.
Additionally, to the last character in the chain the value 128 (bit 7) is added (after deducting 54 like mentioned previously).
For Example:

The word "CONGRATULATIONS" appears in the rom as follows:
"0D 19 18 11 1C 0B 1E 1F 16 0B 1E 13 19 18 9D" (the 9D at the end is the letter "S" with bit 7 turned on)

All text about levels and rom tests are located in ROM R32U26

The video is 720 by 480, but it should be 1440 by 480 (times two (2x) horizontally). This only applies to the visible game zone (upper area).
The lower area is not visible and is left alone at 720 by 480.
The data sync area is composed of 48 lines alternating black and white 14 bits each.
It always begins with two white blocks that do not touch each other, as if they were "0+0" or "FF+FF".
It always ends with a black block that means value "0" or "FF".
Additionally, lines alternate with one another (like in a chess grid or XOR'EADA 255)
If one line is 1, the adjancent line is then 254. This serves for checking.
This way, we get 24 rows of 14 bits each.

======================
0000-9FFF --> VRAM
A000-BFFF --> RAM (BUT IT COULD BE A000-B800)
----------------------
C800-CBFF --> I/O:

C000-C0FF --> COLOR PRAM (256)????
C800      --> CHANGES BETWEEN RAM AND ROM (page flip???)
              0= normal mode, with proper ROMS and RAMS from CPU
              1= readies ROMS of the PVG from 0000 to 8000 (the TEXT is fixed at C000)
              2= readies RAM of the PVG from 0000-A000
              4= maps CPU ROM banks  0000-4000 and 4000-8000 with the adjacent ROMs.
CB00-CB02 --> ????? (They appear to be INPUT and OUTPUT)
CB90      --> FIELD
CBA0      --> VERTICAL CONTROL: A0 NEEDS to be "0" TO ADVANCE
CBA1-CBA3 --> ????
CBB0      --> DMA ??? activates direct access to video RAM
CBB8-CBBF --> BLITTER : If it has the value CBB8, then it triggers the BLITTER (starts to draw)
CBC0      --> ROM BANKS to select: from 0 to 3F. If the value is FF then read VRAM instead of ROM
CBC1      --> ???? I it set to zero upon startup
CBD0      --> EXPANDER + BACKGROUND ON/OFF --> "0=ON" "3=OFF"
CBE0      --> SELECTS COLOR PALETTER (WRITES A LOT OF "1"s)

THE VGG USES A0-A6 TO CONTROL THE 6810, with has 128 bytes of memory!

---------------------
CC00-EFFF --> CMOS



=======================
C980-C983 --> PIA-1 on CPU_Board (sound being the second group, 82-83, labeled "B")
C984-C987 --> PIA-2 on CPU_Board
MAIN CPU (2 PIA)
---------------------
PIA-1A: ..............C980-1...................
   0 AUTO-UP
   1 ADVANCE
   2 SCORE-RESET
   3 LEFT-COIN
   4 CENTER-COIN
   5 RIGHT-COIN
   6 SLAM-SWITCH (TILT)
   7 MEM PROT
   CA1 DON'T KNOW WHERE IT GOES
   CA2 DON'T KNOW WHERE IT GOES

PIA-1B: ...............C982-3.............................
   0-7 GOES TO SOUND MODULE
   CB1 GOES TO "SND ACK"
   CB2 GOES TO "CPU INT" (6809 CPU OF SOUND MODULE)

....................

PIA-2A: ................C984-5.....................
   0 STEER 1 --> The STEER are six buttons that read the handle
   1 STEER 2
   2 STEER 3
   3 STEER 4
   4 STEER 5
   5 STEER 6
   6 PLAYER START 1
   7 PLAYER START 2
   CA1 VA A GND
   CA2 VA A "SND RESET" (Only outputs to the module?)
   

PIA-2B: ................C986-7........................
   0 POWER 1 --> POWER are 4 butons
   1 POWER 2
   2 POWER 3
   3 POWER 4
   4 BRAKE 1 --> BRAKE y TURBO are 3 buttons
   5 BRAKE 2
   6 TURBO
   7 GEAR HI/LOW
   CB1 GOES TO GND
   CB2 I THINK IT REMAINS DISCONNECTED


SOUND (2 PIA AND ONE 6809)
----------------------------
PIA-3
PIA-4


According to the theory I read, I can't access this PIA because it is controlled by it's own 6809 and some part of the VGG (but not the main CPU)

PIF (PROCESS INTERFACE) (1 PIA) CONTROLS THE LASERDISC
-------------------------------
PORT B
   0 JMP TRIGGER
   1 SCANC
   2 CONTROL JMP TRIGGER / SCANC (INPUTS 0 Y 1)
   3 CONTROL REMOTE CONTROL (INPUT 4)
   4 REMOTE CONTROL
   5 STAND BY
   6 ODD/EVEN (INPUT)
   7 VREF??? (VIDEO REFF???) (INPUT)
   CB1 VIDEO SQUELTCH (INPUT)
   CB2 DISPLAY ON/OFF (OUTPUT)

PORT A
   VGG Conection
   CA1 Y CA2 goes with CB1-CB2 on the PIF
   CA1 Y CA2 VAN A LOS CB1-CB2 on the PIF

   
----------------------------------------
PIA for the Expander (controls the LD's PIF)
========================
CB80-CB83 --> PIA-x in ... 81, if it is zero it does not advance. 83 appears to be an important IRQ (maybe 82 and 83 belong to the laserdisc)

VGG VIDEO GRAPHICS GENERATOR (1 PIA)  CONTROLS THE "EXPANDER" AND GRAPHICAL BLITTER
---------------------------
CONTROLLED VIA "CB80-3"
PORT A --> CB80-1
   CONTROLS THE "EXPANDER"
   CA1 GOES TO "HALT-CPU"
   CA2 GOES TO "EXPANDER"

PORT B --> CB82-3
   CONNECTION WITH "PIF"
   CB1 Y CB2 GOES WITH CA1-CA2 on the "PIF"

EXPANDER
--------
GOES TO PORT "A" ON THE VGG'S PIA. It scales the image 2X wide and moves it to either side.


Last edited by rdg2009 on Wed Nov 20, 2013 11:42 am, edited 3 times in total.

Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Tue Nov 19, 2013 6:47 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2118
Location: Salt Lake City,Utah, USA
Thanks for posting this!!

I've moved this to a more permanent location so that it does not get deleted.

I'm working on another project at the moment, but some day I would like to help get Star Rider fully emulated. Feel free to use this forum to log any notes you have. :)

_________________
Check out my cool projects!


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Thu Dec 12, 2013 9:02 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Hello again.
Sorry for not a long time without update, but hasn't any new information. This is the reason to publicate all my information here.
Only has a new module in order to emulate 6821 PIA for communicate CPU with LD Module, but not run well yet.

The most important thing at this moment, is for try to get all data from coded video file.


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Thu Dec 12, 2013 9:57 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2118
Location: Salt Lake City,Utah, USA
Do you have any information about which pins on the PR-8210A star rider actually uses?

_________________
Check out my cool projects!


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Tue Jan 07, 2014 6:01 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2118
Location: Salt Lake City,Utah, USA
I've been disassembling the PIF ROM to try to understand how and when JMP TRIGGER is used. In my travels, I found the code that brings the REMOTE CONTROL line low for 260 uS. Here is the disassembly and my comments:

Code:
ROM:F5FA ; Hold PR-8210A remote control line low for 260 microseconds (ie do a pulse)
ROM:F5FA ; Each loop is 26 cycles long, and the loop iterates 10 times.
ROM:F5FA ; At 1 MHz (1 cycle = 1 uS) this adds up to be 260 uS.
ROM:F5FA ; PR-8210A service manual (page 37) confirms that 260 uS is the correct time interval.
ROM:F5FA
ROM:F5FA DoPR8210APulse:                         ; CODE XREF: sub_FAAA+10P
ROM:F5FA                                         ; sub_FAAA+1AP ...
ROM:F5FA                 ldb     #$A
ROM:F5FC
ROM:F5FC PulseLoop:                              ; CODE XREF: DoPR8210APulse+12j
ROM:F5FC                 lda     #$E7 ; 't'      ; +2 cycle
ROM:F5FE                 sta     word_8002       ; set peripheral output (bits 0-2 set, 3-4 clear, 5-7 are input so it doesn't matter)
ROM:F5FE                                         ; 0: JMP TRIGGER' disabled (ignored)
ROM:F5FE                                         ; 1: SCAN C set (ignored)
ROM:F5FE                                         ; 2: JMP TRIG & SCAN C INT/EXT' set (internal)
ROM:F5FE                                         ; 3: remote control INT/EXT' clear (EXTERNAL ENABLED)
ROM:F5FE                                         ; 4: remote control clear (pulse active)
ROM:F5FE                                         ; rest are inputs
ROM:F5FE                                         ;
ROM:F5FE                                         ; (+4 cycle)
ROM:F601                 nop                     ; +2 cycle
ROM:F602                 nop                     ; +2 cycle
ROM:F603
ROM:F603 loc_F603:                               ; CODE XREF: DoPR8210APulse+9j
ROM:F603                 brn     loc_F603        ; branch never (NOP)
ROM:F603                                         ; +3 cycle
ROM:F605                 lda     #$E7 ; 't'      ; +2 cycle
ROM:F607                 sta     word_8002       ; +4 cycle
ROM:F60A                 nop                     ; +2 cycle
ROM:F60B                 decb                    ; +2 cycle
ROM:F60C                 bne     PulseLoop       ; +3 cycle
ROM:F60E                 lda     #$F7 ; '˜'      ; +2 cycle
ROM:F610                 sta     word_8002       ; set peripheral output (bits 0-2 set, 4-7 set)
ROM:F610                                         ; 0: JMP TRIGGER' (ignored)
ROM:F610                                         ; 1: SCAN C (ignored)
ROM:F610                                         ; 2: JMP TRIG & SCAN C INT/EXT' (internal)
ROM:F610                                         ; 3: remote control INT/EXT' (external)
ROM:F610                                         ; 4: remote control set (pulse inactive)
ROM:F610                                         ; the rest our inputs so don't matter
ROM:F610                                         ;
ROM:F610                                         ; (+4 cycle)
ROM:F613                 rts
ROM:F613 ; End of function DoPR8210APulse

_________________
Check out my cool projects!


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Fri Jan 10, 2014 4:22 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Interesting. Let me one day to look into this code.
I don,t has any information aboutt ld. :-(


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Sun Mar 02, 2014 11:03 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2118
Location: Salt Lake City,Utah, USA
Quote:
My name is Joseba Epalza. In the last year, i'm working on emulator in Freebasic code (yes, "BASIC" source code....) and did make so many advance on it. (does you remember "https://www.daphne-emu.com:9443/phpBB2/viewtopic.php?p=13878#p13878"? ;-) )
In you progress, you must use PIA port "CBD0: EXPANDER + BACKGROUND ON/OFF --> "0=ON" "3=OFF" in order to get video background expand 2x. From this way, th road goes double of his size, and the motorcycles run well into road.
If you need any of help said me, and with my source code, and your source code, maybe "look the light into the cavern"


Hi Joseba,

I saw your post. Thanks for the interest!

Right now when I insert two coins to play, the game locks up. I have had a very hard time figuring out why, but I think I know the path it takes.

I believe at 44F5, it checks the value of A1BC and returns Z flag set so that the branch goes to 4504, which eventually leads to a JMP at 451B. The lock-up occurs at E0B3, an endless loop that can only succeed (?) if IRQ is disabled (and IRQ will be enabled here), because CBA0 will only be 0 during the IRQ handler or when the IRQ disabled.

UPDATE : I am now considering the possibility that on real hardware the loop at E0B3 may still be able to be exited even if IRQ is enabled due to delay in interrupt taking effect on the 6809 and also propagation delay of the END SCREEN' line. I need to do some more research on this.

UPDATE: I got a game to start

See http://my-cool-projects.blogspot.com/2014/03/star-rider-3-march-2014.html

_________________
Check out my cool projects!


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Tue Mar 04, 2014 6:08 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2118
Location: Salt Lake City,Utah, USA
Ok, so any idea on what the expander PCB's inputs mean? I see that 0x140 is sent to it a lot so I assume this means "dead center" but the rest is some weird convention that I can't immediately understand.

_________________
Check out my cool projects!


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Tue Mar 04, 2014 8:46 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
I don't know anything about 0x140. In my research, PIA port CBD0 only has two values: 0 means "background on and expander on" and '3' is for "background video off and expander off", in order to show menues or score board. When PIA out '0' to Expander Board, my emulator "switch off" video, whe it's '3', video goes to double of size, is very simple.

Let me a few days (maybe this week end) to recover all my basic code, and try to look for values from expander in and out.

My "Basic Source Code" is very ugly and so many routines are incomplete, like 6821 emulator. On this one, is mostly "simulator of 6821" than "emulator of 6821", and for this reason, my complete star rider emulator don't run well, but anyway, will goes to help you.


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Sat Mar 08, 2014 9:10 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Did trying to get any new information about PIF in my FreeBasic emulator, but, nothing appears. My simple emulator hasn't 6821 module emulated, and all of datas I/O are being simulated in order to get "virtual" laser disc to run.
Sorry if don't help you on this, but, at rhis moment is very complex emulate two 6809 CPU and several 6821. By this reason, my emulator only has one CPU and zero 6821. With this configuration, many errors on run.

Maybe, willl need to traslate all my code from freebasic to C.

Or even, try to make 6821 emulator in FreeBasic getting from mame C code. I don't know .... so many questions on my head....

Meanwhile think that need dissasembly more information from roms.

EDIT: in my emulated game, don't run when insert coin, has an error "disc fault 507" and game hung up


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Sat Mar 08, 2014 10:14 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2118
Location: Salt Lake City,Utah, USA
I have reverse engineered pretty much all of the PIF board. It is much simpler than the main CPU + VGG board.

Here are my notes and disassembly if it would be helpful for you.

_________________
Check out my cool projects!


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Sat Mar 08, 2014 10:43 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
Ok. Interesting. Look it to try run game when insert coin.


Top
Offline Profile  
 
 Post subject: Re: StarRider:I'm trying to make LaserDisc emulator in FreeB
PostPosted: Sun Mar 09, 2014 8:10 pm 
Registered User
Registered  User

Joined: Mon Oct 21, 2013 2:51 pm
Posts: 6
My poor emulator already run when insert coin and press start player. Error "DISC FAULT" not appear.
In my emul, doesn't has two CPU or 6821. In Freebasic is very difficult to implement two or more CPU and several 6821 PIA.
For this reason, to emulate PIF board in my case, need to "simulate" it, not "emulate", and the results are very different from your emulator.
To simulate PIF and avoid disc error, needs to patch several conditions into ROM allocations.
Three zones is necessary to patch:

[code]
parche 1
19DF: BD E5 54 jsr 0xE554
19E2: FD A1 B9 std 0xA1B9
19E5: B6 A1 0E lda 0xA10E
19E8: 81 06 cmpa #06
19EA: 27 F2 beq 0x19DE --> poner siempre CCZ=1 para evitar error
19EC: FC A1 B9 ldd 0xA1B9
19EF: 10 8E 69 76 ldy #0x6976 --> texto "DISC FAULT" (rom 26) tambien en la F8AA)


parche 2
9351: 27 0C beq 0x935F --> poner siempre CCZ=1 para evitar error
9353: 7F CB E0 clr 0xCBE0
9356: BD F8 9A jsr 0xF89A --> salta a la rutina que pone el error DISC FAULT


parche 3
E806: 1C EF andcc #EF
E808: BD E5 54 jsr 0xE554
E80B: CC 00 03 ldd #0x03
E80E: BD 7E 75 jsr 0x7E75
E811: 25 05 bcs 0xE818
E813: 27 03 beq 0xE818 --> poner siempre CCZ=1 para evitar error
E815: 7E F8 9A jmp 0xF89A --> salta a la rutina que pone el error DISC FAULT


rutina que pone el error DISC FAULT
debemos EVITAR que llegue aqui, para que no salga el error
F89A: 34 76 pshs u,y,x,b,a
F89C: 8E 30 60 ldx #0x3060
F89F: FD A7 86 std 0xA786
F8A2: 7F A7 85 clr 0xA785
F8A5: CE 5F E4 ldu #0x5FE4
F8A8: C6 EE ldb #EE
F8AA: 10 8E 69 76 ldy #0x6976 --> texto "DISC FAULT" (tambien en la 19EF)
[/code]

Thanks to this three patch, can run game, and read codes from "simulated" PIF, but, is very complex (yet)
studing all commands sending from/to main board towards pif board.

The only value that discover (maybe), is for player position (front of motorcycle), saved into &hA106.
I think that "0d" value is for left, "63d" value is for right and "31d" is for center.

Needs to found th most important value: video position relative to player position.
Maybe, 0x140 value that you discover, Matt, is center of video, but in all data from RAM in my emulator, doesn't found it...

Go back to the investigation for a few days more from now...

edit: [code][/code] not working? and my number of msg always six?? (me has 12 msg at this point!!!)


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net