• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Class 365 PBC Unit and PIS system

Status
Not open for further replies.

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
I'm now looking into incorporating this into the PIS system.

By intercepting the data between the controller and internal display, I can figure out what route is selected, current station etc and use that to play the announcements at the right time!

I'll keep everyone updated how this goes.
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

bramling

Veteran Member
Joined
5 Mar 2012
Messages
20,387
Location
Hertfordshire / Teesdale

Wow looks really good.

One observation from a realism point of view. As I remember it, on 365s the announcement didn’t play until the message had stopped scrolling. So, for example, on “The next station is Watlington”, the announcement needs to play later. Wait til the screen says just “Watlington” where it stops scrolling, and probably give it a second or two after that as well.

Others will have to confirm, but I don’t think the screens scrolled the full “welcome aboard the west Anglia great northern” message. I think they just showed “This train is for Kings Cross”, pause and then the Calling at … scroll. I assume the welcome aboard message again would have played at the point the screen froze with “Kings Cross”.

I hope that makes sense, this is so close to being 100% real now.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Wow looks really good.

One observation from a realism point of view. As I remember it, on 365s the announcement didn’t play until the message had stopped scrolling. So, for example, on “The next station is Watlington”, the announcement needs to play later. Wait til the screen says just “Watlington” where it stops scrolling, and probably give it a second or two after that as well.

Others will have to confirm, but I don’t think the screens scrolled the full “welcome aboard the west Anglia great northern” message. I think they just showed “This train is for Kings Cross”, pause and then the Calling at … scroll. I assume the welcome aboard message again would have played at the point the screen froze with “Kings Cross”.

I hope that makes sense, this is so close to being 100% real now.
I’m limited with the timing due to how it works so in terms of timing I think that’s the closest I’ll be able to get it.
 

365 Networker

Member
Joined
19 Jul 2019
Messages
537
Also worth noting that there should be no audible gap between "This train is for" and "London Kings Cross" (along with next station announcements) - this is an issue which is very noticeable with modern systems, but the 365 system never suffered from it. 365 announcements always sounded very "natural" and seemed to flow much better than modern systems. Perhaps this is an issue with the software you are using? The audio files are recorded and cut in such a way that they can be played in one sequence with no additional spacing added.

The "This train is for" message never announced all of the stations, that was the WAGN announcement, which only played once at the starting point e.g. Kings Cross or Peterborough.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Also worth noting that there should be no audible gap between "This train is for" and "London Kings Cross" (along with next station announcements) - this is an issue which is very noticeable with modern systems, but the 365 system never suffered from it. 365 announcements always sounded very "natural" and seemed to flow much better than modern systems. Perhaps this is an issue with the software you are using? The audio files are recorded and cut in such a way that they can be played in one sequence with no additional spacing added.

The "This train is for" message never announced all of the stations, that was the WAGN announcement, which only played once at the starting point e.g. Kings Cross or Peterborough.
There is no extra audio space, potentially a software issue? I'm using a custom made C# windows form application however there is no delay between them being played.

All of this info is amazing so a massive thanks to everyone providing it!
 

bramling

Veteran Member
Joined
5 Mar 2012
Messages
20,387
Location
Hertfordshire / Teesdale
There is no extra audio space, potentially a software issue? I'm using a custom made C# windows form application however there is no delay between them being played.

All of this info is amazing so a massive thanks to everyone providing it!

No problem, glad we’re all able to help. This whole project you’ve done is absolutely awesome.

Any other questions or issues do feel free to ask and I’m sure we’ll all see what we can remember. I spent 25 years using 365s daily so have a reasonable memory of how all this used to function, though the years are starting to go by now!
 

365 Networker

Member
Joined
19 Jul 2019
Messages
537
There is no extra audio space, potentially a software issue? I'm using a custom made C# windows form application however there is no delay between them being played.

All of this info is amazing so a massive thanks to everyone providing it!
It sounds like a delay with the loading of the audio files possibly. This video shows how the announcements sounded:-
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Improved the software by a ton, making it faster to read and decode data which has made it possible to more accurately align the timing of the announcements.

(Some of the timings are a tad off but that’s just an easy value to tinker with!)

I’ve also added the WAGN announcement for the start of the route and just this train is for without the calling points for the rest.

There may still be little gaps between each announcement, I’m looking into fixing that by changing how I play each audio.

 

bramling

Veteran Member
Joined
5 Mar 2012
Messages
20,387
Location
Hertfordshire / Teesdale
Improved the software by a ton, making it faster to read and decode data which has made it possible to more accurately align the timing of the announcements.

(Some of the timings are a tad off but that’s just an easy value to tinker with!)

I’ve also added the WAGN announcement for the start of the route and just this train is for without the calling points for the rest.

There may still be little gaps between each announcement, I’m looking into fixing that by changing how I play each audio.


One other tweak - I *think* the “this train is for” message at Watlington, Downham and Littleport would have said “this train is for London King’s Cross, via Ely and Cambridge”. Then at Ely and Waterbeach it would just say via Cambridge.

The above applies only to the announcements. The displays are spot on I think.

One other little detail if ever required, the screens could not correctly display “Ashwell & Morden”. What they displayed instead was
“Ashwell Morden”, with about three spaces in between the two words.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
One other tweak - I *think* the “this train is for” message at Watlington, Downham and Littleport would have said “this train is for London King’s Cross, via Ely and Cambridge”. Then at Ely and Waterbeach it would just say via Cambridge.

The above applies only to the announcements. The displays are spot on I think.

One other little detail if ever required, the screens could not correctly display “Ashwell & Morden”. What they displayed instead was
“Ashwell Morden”, with about three spaces in between the two words.
That’s interesting, the only custom part about this system is to play the announcements, everything else is the original PIS equipment.

Anything to do with the screens, I can’t change only because it’s the original stuff, this is how it was designed to work.

Hence why the display are spot on, because they are working with original controller and equipment.
 
Last edited:

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
One other tweak - I *think* the “this train is for” message at Watlington, Downham and Littleport would have said “this train is for London King’s Cross, via Ely and Cambridge”. Then at Ely and Waterbeach it would just say via Cambridge.

The above applies only to the announcements. The displays are spot on I think.

One other little detail if ever required, the screens could not correctly display “Ashwell & Morden”. What they displayed instead was
“Ashwell Morden”, with about three spaces in between the two words.
To answer the first part, the reason for it not announcing via points yet is just that I haven’t gotten round to it :lol:
 
Last edited:

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
One other tweak - I *think* the “this train is for” message at Watlington, Downham and Littleport would have said “this train is for London King’s Cross, via Ely and Cambridge”. Then at Ely and Waterbeach it would just say via Cambridge.

The above applies only to the announcements. The displays are spot on I think.

One other little detail if ever required, the screens could not correctly display “Ashwell & Morden”. What they displayed instead was
“Ashwell Morden”, with about three spaces in between the two words.
You were correct about Ashwell & Morden or should I say "Ashwell Morden"!
AshwellMorden img (1).jpg
 

thefrickman

New Member
Joined
18 Aug 2025
Messages
1
Location
Switzerland
Full 365 PIS audio data dump (Decoded!)

GT North Announcements
SE Announcements

The audio decoder IC is a MSM6650 which encodes in OKI-ADPCM (OKI made the IC) however there is a FF byte every 100 hex which needs to be decoded in a certain way otherwise the output audio data is all messed up.
The data also includes a table for each announcement, I've not only made a little program for decoding them but also to automatically split each separate announcement.
However I've figured all that out and it's properly decoded!

Update: Forgot to mention - All audio has a low pass filter of 6400Hz applied as per the output specs of the MSM6650 (for extra authenticity)

I've attached a couple that I've converted to mp3 just for an example - actual ones are in raw WAV.

View attachment 192837
View attachment 192838
View attachment 192839
View attachment 192840
View attachment 192841
This is really impressive work, and your MSM6650 explanation is exactly what caught my eye.

I'm working on something similar, but with a different and much older file, you all already know: I'm trying to decode the original PCC file used for the Pic Line on the 1973 stock. I've been able to read the PCC image and can extract the embedded text tables without any problem. Where I'm stuck now and forever is the audio data.

What I've tried so far:
  • Identified the obvious text/metadata region vs the high-entropy regions that should be audio or tables.
  • Looked for MST-style address tables like the ones used in the 365 files, but there is nothing that matches that pattern (no clean ascending address list).
  • Found several candidate "audio" regions and tried decoding them as OKI ADPCM:
    • ffmpeg with adpcm_ima_oki at 6400 Hz, 8000 Hz, and a few other rates
    • Different assumptions about block size and 0xFF padding removal
  • The result is either:
    • Pure static / garbage, or
    • with VOX-style decoding, extremely noisy audio where you can just about hear traces of speech under a lot of distortion, but nothing remotely usable.
  • I have also tried some hand-written IMA/OKI-style decoders on both raw and cleaned streams, with the same outcome: Noise or broken audio, no clearly intelligible phrases.
  • I cannot find anything that looks like a per-announcement index table, unlike the 365 format.
Hardware-wise, I don't actually know what decoder IC the Pic Line system used. Some sources mention KeTech / Jasmin / Whiteley DABS units, but nothing concrete. I also contacted KeTech three times, but so far no replies.

I'm attaching a picture of a DABS Editor unit (a photo that has been floating around online). It is apparently used for preparing PCC cards for LU systems, so maybe someone here recognises the hardware or the encoding method.

So, my questions for anyone who has worked with this kind of data:
  • Has anyone ever managed to decode or play back a Pic Line PCC file with intelligible audio?
  • If so, was it still some form of OKI ADPCM with non-standard framing, or was it something completely different?
  • Is there a known preprocessing or unpacking step (beyond simple 0xFF stripping) that is required before using any ADPCM decoder?
At this point I have not been able to get more than very messy, noisy output where speech is only barely detectable, if at all. Any hints, pointers to documentation, or even "yes, it works but you must do X/Y/Z first" would be massively appreciated.

Thanks in advance and kind regards.
 

Attachments

  • dabs.jpg
    dabs.jpg
    480.3 KB · Views: 27

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Well...
I didn't think it was possible but I've just been able to read the internal EPROM contents of the audio PA unit's S87C654-5F40 microcontroller!

I had previously read online that the internal EPROMs can contain security bits to prevent reading/copying of the software held in the EPROM. Which that along with the information that a compatible reader would cost upwards of £3K, I was put off and considered it unsavable.

Until just now when I decided to have a crack using my usual TL866II Plus EPROM programmer/reader. The programmer doesn't specifically support the 87C654 however it did support similar microcontrollers such as the 87C54. Which is not only pin compatible but has the same sized internal EPROM (16Kb). This didn't mean that the security bits wouldn't still be an issue however.

But in an amazing result Whiteley Electronics never bothered putting on those security bits which meant that I was able to read the full data!

Link to the binary file: PROGRAM.BIN

IMG_5559.JPEG
 

365 Networker

Member
Joined
19 Jul 2019
Messages
537
Well...
I didn't think it was possible but I've just been able to read the internal EPROM contents of the audio PA unit's S87C654-5F40 microcontroller!

I had previously read online that the internal EPROMs can contain security bits to prevent reading/copying of the software held in the EPROM. Which that along with the information that a compatible reader would cost upwards of £3K, I was put off and considered it unsavable.

Until just now when I decided to have a crack using my usual TL866II Plus EPROM programmer/reader. The programmer doesn't specifically support the 87C654 however it did support similar microcontrollers such as the 87C54. Which is not only pin compatible but has the same sized internal EPROM (16Kb). This didn't mean that the security bits wouldn't still be an issue however.

But in an amazing result Whiteley Electronics never bothered putting on those security bits which meant that I was able to read the full data!

Link to the binary file: PROGRAM.BIN

View attachment 193769
Looks like the software was last updated in 1999. I assume the program file was used for "stitching" all of the audio files together - is there any way you could use it for the software you have been working on?

Also, I found this video of an MG Montego with a "talking dashboard" - I noticed this makes the same hissing/squeaking sound as the 365 announcement system did:-
 
Last edited:

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Looks like the software was last updated in 1999. I assume the program file was used for "stitching" all of the audio files together - is there any way you could use it for the software you have been working on?

Also, I found this video of an MG Montego with a "talking dashboard" - I noticed this makes the same hissing/squeaking sound as the 365 announcement system did:-
Well, my hope is to reverse engineer how the program works, figure out what serial data It wants and get it playing the automated stuff!

So it would be, separate microcontroller (ESP32) reads the data from the main PIS, decodes it and sends the relevant command for the corresponding announcement to the PA unit.

The hissing does appear to be a feature of the MSM6650, not only that but probably the whole family range of chips made that noise!
 

365 Networker

Member
Joined
19 Jul 2019
Messages
537
Well, my hope is to reverse engineer how the program works, figure out what serial data It wants and get it playing the automated stuff!

So it would be, separate microcontroller (ESP32) reads the data from the main PIS, decodes it and sends the relevant command for the corresponding announcement to the PA unit.

The hissing does appear to be a feature of the MSM6650, not only that but probably the whole family range of chips made that noise!
I found these online - not sure if they are of any help to you:-
http://www.bitsavers.org/components/oki/_dataBooks/1987_OKI_Voice_Synthesis_LSI_Data_Book.pdf

https://bitsavers.trailing-edge.com/components/oki/_dataBooks/1994_OKI_Voice_Synthesis_ICs.pdf
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
These are the exact ones I used for info on the IC!

On a side note, in terms of preserving these I have been looking whether the ICs in all of these parts are still purchasable, most of them are as they are just general logic ICs however even for the EPROMs and microcontrollers they were so popular that they are pretty easy to get a hold off. -Apart from the M6650 or MSM6650 (it goes by both names). Due to them being almost entirely used for industrial applications, such as this, they are relatively hard to come by. Which is annoying since there isn't any other IC that could do it's job.

To make sure the unit can stay preserved for longer I've decided to purchase one for spares. Even with it's eye-watering price of roughly £40.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
I'm having some success reverse engineering the ROMs not only for the PA unit which is for a 8051 type processor but also the other ROMs which are for Z180 type processors using Ghidra to help disassemble them into not fully but more readable C code.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Great News!!!
The automated announcements are now playable via the PA unit!

(Example with Ramsgate and Dover Priory)

1765747877273.png
I was able to decompile and figure out the portion of the instructions which receives the serial data along with the portion which sets up the serial port.

First a 0x02 "Start of transmission" byte is sent, followed by 0x35 which is '5' in ascii, which is then followed by 4 announcement address bytes and is then ended with a 0x03 "End of transmission" byte. 16 bit addresses are used, the 4 input bytes represent a digit in the address 0xABCD, and can range from 0x00 to 0x09. The software combines the 4 input bytes to form the 16 bit, 2 byte address. As the address data is read, ' ' / space character / 0x20 is removed meaning that the sent address data is the corresponding number in hex plus 0x20. So 0x00 becomes 0x20 and 0x09 becomes 0x29.

The example in the video is address 3071, the data sent is 0x02, 0x35, 0x03, 0x00, 0x07, 0x01, 0x03.

The PCB uses a SN75176A for RS-485 communication, for this temporary setup I have a test wire connecting to it's output so then I can skip having to make a RS-485 signal. The output however is then connected to the cathode of a HP2601 optocoupler, how this IC works and how it's used in the setup means that the output is inverted however due to the cathode being used, this is cancelled out.

Serial = high, Optocoupler = low, Output = high (inverted)
Serial = low, Optocoupler = high, Output = low (inverted)

This means that I cannot drive the optocoupler directly from an ESP32 microcontroller as a low output would not be properly grounded to operate the cathode. Instead I used a NPN BJT which initially caused problems as this made the serial line inverted, to solve this I used an initial NPN to invert the serial line then another to switch the ground line for the optocoupler.

IMG_5589.JPEG
 

365 Networker

Member
Joined
19 Jul 2019
Messages
537
Great News!!!
The automated announcements are now playable via the PA unit!

(Example with Ramsgate and Dover Priory)

View attachment 193911
I was able to decompile and figure out the portion of the instructions which receives the serial data along with the portion which sets up the serial port.

First a 0x02 "Start of transmission" byte is sent, followed by 0x35 which is '5' in ascii, which is then followed by 4 announcement address bytes and is then ended with a 0x03 "End of transmission" byte. 16 bit addresses are used, the 4 input bytes represent a digit in the address 0xABCD, and can range from 0x00 to 0x09. The software combines the 4 input bytes to form the 16 bit, 2 byte address. As the address data is read, ' ' / space character / 0x20 is removed meaning that the sent address data is the corresponding number in hex plus 0x20. So 0x00 becomes 0x20 and 0x09 becomes 0x29.

The example in the video is address 3071, the data sent is 0x02, 0x35, 0x03, 0x00, 0x07, 0x01, 0x03.

The PCB uses a SN75176A for RS-485 communication, for this temporary setup I have a test wire connecting to it's output so then I can skip having to make a RS-485 signal. The output however is then connected to the cathode of a HP2601 optocoupler, how this IC works and how it's used in the setup means that the output is inverted however due to the cathode being used, this is cancelled out.

Serial = high, Optocoupler = low, Output = high (inverted)
Serial = low, Optocoupler = high, Output = low (inverted)

This means that I cannot drive the optocoupler directly from an ESP32 microcontroller as a low output would not be properly grounded to operate the cathode. Instead I used a NPN BJT which initially caused problems as this made the serial line inverted, to solve this I used an initial NPN to invert the serial line then another to switch the ground line for the optocoupler.

View attachment 193912
Very good! Did you manage to get the "This train is for London Victoria" announcement to work? I believe there were a few versions with different "via" messages similar to the GN announcements.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
Very good! Did you manage to get the "This train is for London Victoria" announcement to work? I believe there were a few versions with different "via" messages similar to the GN announcements.
There’s quite a few on there (over a 1000!) so it’s going to take a bit of time to document/find them all.
 

simonmpoulton

Member
Joined
25 Jun 2011
Messages
217
This is really impressive work, and your MSM6650 explanation is exactly what caught my eye.

I'm working on something similar, but with a different and much older file, you all already know: I'm trying to decode the original PCC file used for the Pic Line on the 1973 stock. I've been able to read the PCC image and can extract the embedded text tables without any problem. Where I'm stuck now and forever is the audio data.

What I've tried so far:
  • Identified the obvious text/metadata region vs the high-entropy regions that should be audio or tables.
  • Looked for MST-style address tables like the ones used in the 365 files, but there is nothing that matches that pattern (no clean ascending address list).
  • Found several candidate "audio" regions and tried decoding them as OKI ADPCM:
    • ffmpeg with adpcm_ima_oki at 6400 Hz, 8000 Hz, and a few other rates
    • Different assumptions about block size and 0xFF padding removal
  • The result is either:
    • Pure static / garbage, or
    • with VOX-style decoding, extremely noisy audio where you can just about hear traces of speech under a lot of distortion, but nothing remotely usable.
  • I have also tried some hand-written IMA/OKI-style decoders on both raw and cleaned streams, with the same outcome: Noise or broken audio, no clearly intelligible phrases.
  • I cannot find anything that looks like a per-announcement index table, unlike the 365 format.
Hardware-wise, I don't actually know what decoder IC the Pic Line system used. Some sources mention KeTech / Jasmin / Whiteley DABS units, but nothing concrete. I also contacted KeTech three times, but so far no replies.

I'm attaching a picture of a DABS Editor unit (a photo that has been floating around online). It is apparently used for preparing PCC cards for LU systems, so maybe someone here recognises the hardware or the encoding method.

So, my questions for anyone who has worked with this kind of data:
  • Has anyone ever managed to decode or play back a Pic Line PCC file with intelligible audio?
  • If so, was it still some form of OKI ADPCM with non-standard framing, or was it something completely different?
  • Is there a known preprocessing or unpacking step (beyond simple 0xFF stripping) that is required before using any ADPCM decoder?
At this point I have not been able to get more than very messy, noisy output where speech is only barely detectable, if at all. Any hints, pointers to documentation, or even "yes, it works but you must do X/Y/Z first" would be massively appreciated.

Thanks in advance and kind regards.

I'd say you need to figure out the exact chip used in the original system to have any clue as to the audio format. You talk about it being earlier than the 365 system which would point to an older format maybe not ADPCM at all. If it's newer then it might even be OKI ADPCM2.
 

WMasterJedi

Member
Joined
23 Nov 2023
Messages
282
Location
England
That could have been something to do with WAGN’s one-time big idea to run north of Peterborough, which thankfully never came to fruition.
Interesting that they were implemented into the message look-up table but never used in the actual routes and is never mentioned at all in the PA unit data.
 

D365

Veteran Member
Joined
29 Jun 2012
Messages
13,180
Interesting that they were implemented into the message look-up table but never used in the actual routes and is never mentioned at all in the PA unit data.
Would I be right in saying that InterCity had, on a few occasions, borrowed Class 317 and/or Class 321 units to cover for grounded IC225s. Perhaps there was a feeling that the Class 365s might at some point need to be similarly deployed.
 
Status
Not open for further replies.

Top