Amiga disassembly

Discuss the reverse engineering and emulation (as opposed to simulation) of any sort of Prevue hardware, including Atari-based and Amiga-based EPG channels and the Amiga-based Prevue/TV Guide channels.
mixdup
Posts: 18
Joined: Sun Dec 25, 2011 1:51 am

Re: Amiga disassembly

Post by mixdup »

This is great! Glad to see you're back at it, Ari.
AriX
Site Admin
Posts: 826
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Amiga disassembly

Post by AriX »

mixdup wrote:This is great! Glad to see you're back at it, Ari.
Thanks! Bunch of progress yesterday. I'm updating the wiki a lot: http://prevueguide.com/index.php/UVSG_Satellite_Data
I have unearthed a few more CTRL and DATA commands...
20CenturyFan
Posts: 93
Joined: Tue Sep 06, 2011 3:36 pm

Re: Amiga disassembly

Post by 20CenturyFan »

I have it to the point now where I set the uSleep to anywhere between 47000 and 55000 and ran the program once, and when I check diagnostic mode, both CTRL H and CTRL T are 5 (sometimes 4 or 6), and CTRL Cmds:00000001. My first question is where does the 6 come from if only 5 bytes are being sent (or does the CTRL program attempt to send the data multiple times and its getting a few bytes per trial)?

I also notice that if I run it while in diagnostic mode, not all the bytes are coming at the same time (For example, it will say 2, then 4, then 5)

I think I am making progress in getting it to accept more bytes, but I don't know what it is seeing, since ESQ still does not draw an overlay.
AriX
Site Admin
Posts: 826
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Amiga disassembly

Post by AriX »

20CenturyFan wrote:I have it to the point now where I set the uSleep to 55000 and ran the program once, and when I check diagnostic mode, both CTRL H and CTRL T are 5 (sometimes 4 or 6), and CTRL Cmds:00000001. My first question is where does the 6 come from if only 5 bytes are being sent (or does the CTRL program attempt to send the data three times and its getting a few bytes per trial)?
No, the bytes are only sent once - and there are only five of them. But the way they are sent, which is called bit-banging, is an odd way to send data, and is different than normal serial communications. It's kind of hard to explain, but basically if the bits are not received correctly, the byte will be discarded completely. So it's possible that with the delay of 55000, it's actually receiving 11 bytes, but only 5 of them made enough sense to be counted. This doesn't seem to be the case, because you are getting Cmds, but it's worth considering. I don't know if you code or not, but this is my C code version of how ESQ's CTRL I/O routines work. If you want to compile and run it, it might help to understand what the program is actually doing. (Except instead of asking you for a 0 or 1, ESQ checks the state of the CTS pin on the serial port.)
20CenturyFan wrote:I also notice that if I run it while in diagnostic mode, not all the bytes are coming at the same time (For example, it will say 2, then 4, then 5)
When you do it in diagnostic mode, it does not parse the data coming in - and it may reset the data at some point. I would just avoid doing it in diagnostic mode. But if you are able, try swapping your ESQ binary out for this one: http://cl.ly/2N2U0U3Z3a0g3T2Q0b0H
This version will display information about the CTRL bytes being received when it receives the serial command "55 AA 47." I can't do it at this second, but I can write you a version of the other program that will automatically send that command after each byte is sent; for now, send that command manually to print the diagnostics to the listings. One of the things printed will be the hex of the last byte received, which you can use to figure out if data is being sent reliably or not. CTRLState and CRC will also be helpful; I think I talked about what they represent a few pages back, but if not, feel free to ask me to explain further.
20CenturyFan wrote:I think I am making progress in getting it to accept more bytes, but I don't know what it is seeing, since ESQ still does not draw an overlay.
Remember that it won't spontaneously draw an overlay - you need to hit the L or R keys.
20CenturyFan
Posts: 93
Joined: Tue Sep 06, 2011 3:36 pm

Re: Amiga disassembly

Post by 20CenturyFan »

I am not a programmer/coder, but I do my best to improvise things. :)

I tried your version of ESQ in a stripped down version of the Prevue ADF (I had to delete some things to make room for the program to fit on the disk). The first thing I did was send the CTRL command. Checked DM afterwards, still got 5 and 5 for CTRL H and T, respectively, and Max was "01". However, CMD was all 0's (turns out that it has been that way almost this whole time, just that one instance it said 00000001). I sent that 55 AA 47 through my COM Port Data Emulator and it did nothing but make the cursor blink for a moment. However, I noticed that when it got halfway through my listings, Prevue crashed, and got a guru meditation error. I tried this three times just letting it sit, and even if I did nothing it would still crash with the error I pasted below (I am wondering though if it had anything to do with what I removed from the disk in order to make room for this unpowerpacked binary). But I am also wondering if where it crashed is where the diagnostics were supposed to be printed. (Seems to happen around channel 99, which is in the middle of my listings. I have about 20 channels in the first half of my grid).

I had to admit though... this is the first time that I've seen Prevue crash with my listings loaded. I couldn't help but to take a moment to laugh :lol: I probably didn't proceed with this properly. The problem could very well be on my end somewhere.
Attachments
Guru.jpg
Guru.jpg (22.17 KiB) Viewed 9541 times
woddfellow2
Posts: 119
Joined: Tue Jan 19, 2010 1:50 pm
Contact:

Re: Amiga disassembly

Post by woddfellow2 »

The only times, of which I am aware, in which I crashed Prevue, involved the h and j keybindings to display the CLU and PI information, respectively...

If it encountered a long entry, such as a film listing, it would Guru Meditation.
—xoddf2 | wlair.us.to
AriX
Site Admin
Posts: 826
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Amiga disassembly

Post by AriX »

Well, this wasn't really Prevue crashing - it was only crashing because of my cobbled-together modifications ;)
Try this one. It doesn't directly call the CTRL routine, so I think it will work better: http://cl.ly/3N0L3x1q272v2r1p2c1F
AriX
Site Admin
Posts: 826
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Amiga disassembly

Post by AriX »

I really need to get back to my Amiga and write some code that runs the CTRL with exact timing, rather than the approximate uSleep values. I would love to be able to release all of this stuff I've worked on, and I know I will eventually -- hopefully this summer.
Matthew Joseph
Posts: 104
Joined: Mon Jun 06, 2011 4:17 am
Location: Philippines

Re: Amiga disassembly

Post by Matthew Joseph »

Well, good luck, AriX in finding some CTRL & DATA commands to work out this summer. And maybe we might get something more in the curday.dat, config.dat file and we might maybe inject our data with the blinking in Atari.

P.S. And anyway, happy 4th of July.
I'm a guy who loves Prevue/TVGC and other stuff like Power Rangers etc.
tin
Posts: 567
Joined: Sat May 08, 2010 9:54 pm

Re: Amiga disassembly

Post by tin »

Hey, I might actually be in the same boat as you Arix. Might be a big change in circumstances later this summer, that MIGHT afford me some time :)
Post Reply