Curday.dat Data Format

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.
Post Reply
nwgatwcfan
Posts: 115
Joined: Mon Jul 05, 2010 5:52 pm

Re: Curday.dat Data Format

Post by nwgatwcfan »

hen7713 wrote:What day is today in curday.dat? I tried using 0 and 1, but neither seemed to have worked.
Try 00. I think the system will always read two characters for julian date in curday.dat.

Check and see if that works.

Steven



Sorry about that. I'm thinking in terms of HEX. 1 was correct for Jan. 1. Today's date should be 2. I believe the nextday file has to be edited as well as the curday file in order for it to work. Please correct me if I am wrong on this.
woddfellow2
Posts: 119
Joined: Tue Jan 19, 2010 1:50 pm
Contact:

Re: Curday.dat Data Format

Post by woddfellow2 »

If I change the notices in PRV002, I get this:
Image
The entry is 1 line tall instead of 2. As the "Prevue Becomes TV Guide Channel" video suggests (at about 370 seconds), it is possible that sometime between mid-to-late 1998 and early 1999, a later software revision changed it to display like that (1 line tall) instead of as it was before (2 lines tall).

Also, because I can:
Image
—xoddf2 | wlair.us.to
Matthew Joseph
Posts: 104
Joined: Mon Jun 06, 2011 4:17 am
Location: Philippines

Re: Curday.dat Data Format

Post by Matthew Joseph »

If I edit the curday.dat in a Spanish localization, it will be more harder to do it, because of local airport codes of some areas in Mexico, and parts of U.S. that has a Spanish localizations and I don't know if the guide will recognized the Spanish language.

EDIT: And we don't have any Spanish versions of Prevue Guide or Prevue Latino emulator for Amiga!!!
I'm a guy who loves Prevue/TVGC and other stuff like Power Rangers etc.
nwgatwcfan
Posts: 115
Joined: Mon Jul 05, 2010 5:52 pm

Re: Curday.dat Data Format

Post by nwgatwcfan »

Hi all. I think I can put to rest a few more questions that have come up about Curday.dat and some interesting facts that you may not have seen yet. Here goes...

First of all, what I did was take the Los Angeles listings and run the listings for 7 days non-stop in the emulator. What I wanted to do was see if any files changed during each day and the answer is yes. In fact quite a few files changed file-modified dates. Curday.dat, Nxtday.dat, oinfo.dat, LocAvail.dat, local.ads, dst.dat, and PromoId.dat all updated itself during the testing. In fact, they were updated each day at about the same time each day, between 7 - 10 pm at night. Also, believe it or not, the Curday.dat file and the Nxtday.dat files automatically re-PowerPack during this time. So, each day's listings that remained during the test, I had to unPowerPack later. So, even though I put in listings that were not PowerPacked, the system automatically knew to re-Powerpack them later.

On to some more good stuff learned from the test. I also wanted to see what happened to Curday.dat and Nxtday.dat during the test to see what changed each day and what didn't. Obviously the Julian Date changed in the top block. But here's the shocker, that's not the only place where the Julian Date appears in the listings. When I ran the test, I noticed each day that changed, the character that started each block of listings within curday changed as well. Turns out that the "[" that starts the listings isn't the only character, in fact every single character can be put here. If you look at the ASCII chart, you will see that the "[" is the 91st character listed. As I did the test with days further down (I used the current past week for this test), I started getting a set of "i" characters that had accent marks above. It turns out that each day I ran the test, a different character appeared and was in sequence with the ASCII list. I converted these to decimal format and lo and behold, it was the Current Julian day. So, this proves why the system wouldn't recognize anything over 255, because it was going to be converted into a single character at the beginning of each listing in Curday.

Some more information on Curday that will blow your mind. I took listings on a second machine (yes I know I have two computers running Prevue Gude - I had a lot of time on my hands thanks to a lovely Gall Bladder removal) and altered some data as a trial and error. I wanted to look at the first block of settings where it defines the Highlighting and Summary by Source. Anyway, I was looking at the channel 95 in the L.A. Listings where it breaks into two channels (TWC and Golf Channel). The 6 characters that appear as FF are actually time blocks to show or hide listings. There are a total of 6 blocks during each day: The first block starts at 5am and lasts until 8:59am, the next starts at 9 am and lasts until 12:59pm, ete. They are four hour blocks. So, when a block has a null character, that channel is not listed for that 4 hour time period. If it shows FF in the block, then it shows the listing. There are variations, on Channel 95, there is a character that precedes that starts the listings (which is Hex Code FC). You'll notice that the FC code appears on the Weather Channel's listings first thing, while it takes the 4th block for Golf Channel. Well at 5pm, the listings for TWC go away and are replaced with Golf. There is also another block that has split listings as well, that would be the listings for channel 35 TVJapan. Turns out that in the 5 block of time, which is in the 9pm to 12:59am block. The listings for TV Japan drop out of the scroll. What was supposed to happen was a channel called PACSUN would show a 4 hour block in it's place. There must have been an issue with the channel (could have been a local LA only broadcast) and the settings were removed by Prevue and so it left the channel without listings during this block. There is a Hex C0 code in the 5th spot in TVJapan to hide it's listing temporarily. You will also notice on TNN-W channel 45, that first and last blocks have different Hex codes listed. These were to tell the scroll when the channel was going off the air for the day. I remember when TNN changed from The Nashville Network to The National Network, that they used to remove the listing before 9 am on our local Prevue channel. TNN did not run 24 hours a day at the time (they sold air time for infomercials)...

The next thing I want to draw attention to is the top block:
AE3366N..4YYNNYYNNl..0.DREV 5.KHHR.Hawthorne.227.91.131.1348

I have discovered by trial and error a few things about this grouping. The first thing I will talk about is the DREV 5 section. I tried some different numbers in this field. What I have discovered is that this tells the system the formatting for the listings. If you try numbers, 1,2,3, or 4, you get a different scroll each time that is garbled. You cannot use zero here or anything greater than 5 or nothing will show. But 5 shows the listings correctly. This may have set the listings scroll for older or newer versions of the Grid.

The second thing I will draw your attention to is the 227.91.131.1348 block, as stated before, we know the 227 is the Jullan date in this example. But the second number has some importance. This number does not relate to the Order Information or even the Next Julian day. Nope, it's actually a counter for how many listings there are in Curday. The way I found this out was by accident. I noticed when I filled this space with anything less than 91, I noticed that the scroll would not display the last few channels or the Prevue Message at the end of the scroll. It techinically could be used to limit how many channels are listed in the scroll by setting the number lower. But it's more for a count of how many channel records to keep up with in RAM.

Lastly, the last two blocks I have not been able to determine yet. I have tried various numbers in these fields. I do know they cannot be Zero in either field, or the listings will not appear at all.

Wait, there's more. Looking back at the listings block again for the channel attributes. The last block is a special character followed by HEX FF FF 30 30. I have found that the special character that precedes it has some meaning as well. Turns out this character can be any character with the exception of HEX 09 (which is a Tab). The listing will disappear if a Tab character is listed there. But this may set up which channels are automatically moved over to Nxtday.dat after the Curday's listings are finished. It may also set which channels are pulled for a Movie Summary or Sports Summary at the end of the listings cycle.

The next thing I am going to try to work on is the listings blocks and validate what the group has come up with. I believe we are going to find the 3rd and 4th positions are going to identify the type of program (sports, news, general, movie) and if it is a movie, what type of movie (drama, comedy, documentary, musical, etc.) it is.

I hope this gives even more insight as to Curday.dat and Nxtday.dat. If I find something else, I will post.

Thanks,
Steven.
AriX
Site Admin
Posts: 826
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Curday.dat Data Format

Post by AriX »

This is great stuff, thanks for posting! Answers a lot of my questions about that file, and probably about the serial data format too! It'd be cool if I had time in the near future to start working on this again...
woddfellow2
Posts: 119
Joined: Tue Jan 19, 2010 1:50 pm
Contact:

Re: Curday.dat Data Format

Post by woddfellow2 »

I made a curday.dat file manually, and it worked:

Image

(I had to upload it to my own Web space because neither Omploader nor this forum's phpBB installation accepted it)

[2011-08-29T23:45-0500] Update: Updating URI
Last edited by woddfellow2 on Tue Aug 30, 2011 12:46 am, edited 1 time in total.
—xoddf2 | wlair.us.to
Win95Setup
Posts: 15
Joined: Mon May 30, 2011 7:00 pm

Re: Curday.dat Data Format

Post by Win95Setup »

woddfellow2 wrote:I made a curday.dat file manually, and it worked:
Wow! Maybe I'll make my own with the Sunlight Cable lineup.
nwgatwcfan
Posts: 115
Joined: Mon Jul 05, 2010 5:52 pm

Re: Curday.dat Data Format

Post by nwgatwcfan »

AriX wrote:This is great stuff, thanks for posting! Answers a lot of my questions about that file, and probably about the serial data format too! It'd be cool if I had time in the near future to start working on this again...
Arix,

The more I researched it and sent the last message, I felt like a host of an infomercial... "Oh but wait, there's more!!" I will say that file is more complicated than anything else I've seen. It's like putting a jigsaw puzzle together. It takes time. As long as we don't get to the end and find we're one piece short, we'll figure it out eventually. Hopefully you'll be at it again soon.

Thanks,
Steven
20CenturyFan
Posts: 93
Joined: Tue Sep 06, 2011 3:36 pm

Re: Curday.dat Data Format

Post by 20CenturyFan »

Being that I always have a tendency to do things the hard way, I actually have been using the "edit.com" program that comes with Windows and editing as binary the curday.dat. After a little bit of trial and error, I have successfully removed a few channels from the middle as an experiment, as well as a few announcements, and edited alot of text (trying to shorten the file... I tried the virtual HD thing but it still insists on saving to the ADF rather than the HD, though the used disk space reported in diagnostic mode is for the HD). A couple of tricky things I came across, however, was the fact that not all characters are visible in that editor (but it does show the ASCII character it is, from 0-255). When I first started doing this, I was wondering why my listings were all messed up, and it was because I was using the spacebar rather than copying the exact character from another channel (ASCII characters 0, 32, and 255 look like a space, but 32 is actually a space). Because I have learned the difference between a space (32) and the other "spaces" (0, 255), I have been able to learn more manipulation with my curday.dat file. One other thing is that even though I have translated some higher end characters into the symbols (such as CC, stereo, PG13, TV-G, PG, etc), I could never seem to get those to work as of yet. I have a feeling that after a while, I may be able to add my own channel manually, character by character, as I am learning the format of how things are laid out in the file.

You guys probably are alot better at this than I am, and probably have much easier methods of doing so :lol: but sticking with even what little I know, I am glad to jump on the Prevue Guide bandwagon.
AriX
Site Admin
Posts: 826
Joined: Tue Nov 24, 2009 11:32 pm
Contact:

Re: Curday.dat Data Format

Post by AriX »

20CenturyFan wrote:You guys probably are alot better at this than I am, and probably have much easier methods of doing so :lol: but sticking with even what little I know, I am glad to jump on the Prevue Guide bandwagon.
Glad to hear it! You might consider using a hex editor instead of your command-line edit tool ;)
Post Reply