Subscribe via RSS
19Sep/110

California – August 2011

Right, here we go... I've been back in Australia for over a week and am only just getting on top of the stack of photos taken from my most recent holiday. This was the not-Japan trip and it began in the USA.

California

The goal was simple... fly the red-eye A380 from Melbourne to LAX, jump in a hire-car and make it to San Francisco the 'scenic way'. A few days would then be spent in San Francisco before returning to LA via the inland route. This would include Yosemite and a few of the larger railroad junctions as seen from Google Maps.

San Luis Obispo

The Pacific Surfliner (I think?) happened to arrive just as we did. There were a few UP Locos stored as well... maybe for banking? The town was great, unfortunately we didn't check out the coffee; there were quite a few lively places around the station to do so though.

Amtrak and UP at San Luis Obispo Amtrak 90208 at San Luis Obispo UP at San Luis Obispo

The pedestrian bridge at San Luis Obispo was well designed. It provided a great view of the station and yard too.

San Luis Obispo Pedestrian Bridge at San Luis Obispo Pedestrian Bridge at San Luis Obispo

I had always thought that the Bachmann models of the Amtrak cars were just cheap and didn't include side-frames on the bogies... turns out they're actually like this in reality... not the prettiest view.

Frameless bogie San Luis Obispo Station Amtrak at San Luis Obispo

Paso Robles

The next stop via Highway 101 was Paso Robles. Not much happening here at all... I nearly expected to see the same Amtrak train coming through, but it seems that we beat it way too easily. The station has a Sushi shop built in, but the prices weren't what we were willing to dish out despite paying the US$.

Paso Robles Station Paso Robles Station Sushi at Paso Robles Station

Quarry Lake (east of Watsonville)

An accidental detour saw us visit a quarry near Quarry Lake. The initial plan was to divert from 101 to check out the seemingly large junction at Watsonville, but the weather and time wasn't on our side.

Quarry Lake Rake at Quarry Lake Facilities at Quarry Lake

Caltrain Station, San Francisco

Caltrain is a loco-hauled/control-cab operating passenger service from San Francisco (right next to the baseball stadium) down to San Jose. Turns out there's a few great restaurants next to the station in San Fran and whilst waiting for dinner I had a few minutes with a friends camera to check out the yard. Fortunately the sun was also in my favour.

San Francisco Caltrain Station Line-up at Caltrain Station 9xx Locomotives at Caltrain Station
Passenger cars at Caltrain Station

As you can see, it's a terminus; they'll end up in the water unless the dig or build over to Oakland. Unfortunately I didn't get to see any of the trains in action, nor ride one, but it's something I'll go back again for.

Trams/Trolley buses in San Fran

I was quite impressed to see the trolley bus routes in San Francisco. I had never actually seen any running and the biggest shock was the lack of noise. I'm used to diesel buses here in Australia and the electric versions are bloody quiet. I imagine it could even be a safety issue if no one can hear them coming?
Another impressive feature was that the trams used one of the trolley bus wires where they shared paths. Of course, the bus would not pick up the other polarity from the ground, so they needed two wires in the air. Trams, on the other hand, only used one and so you'd see, at intersections, trolley buses and trams banked up behind each other.

Trolley Bus Tram #1893 PCC Trolley #1051

San Francisco Cable Car Museum

This is a must-see for any rail enthusiast. Sure, the they're not exactly 'trams', but the techonology behind the system is awesome. This Museum actually still acts as the motive power source for the cars. The cables are turned here to pull the cars up the gradients. The cars are controlled by levers where the driver can choose to detach from the cable and apply brakes... i.e. allowing them to stop at 'stops'. Hence the cables are perpetually spinning, or during hours of operation anyway.

Cable Car Museum Cable Car Museum Cable Car Museum
Cable Car Museum Cable Car Museum Cable Car Museum
Cable Car Museum Cable Car Museum

And then... the Cable Cars...

The world-famous cars that run on the cables are a tourist trap. The ticket price is 4x a standard fare and the queues to ride them are usually large. The cars to move quickly, but I imagine there's a limit to the amount of cars on the cable at once as you'll often see the drivers at the end stops waiting for the other cars to climb the hill. Pretty frustrating as someone in the line waiting.

As for the ride, the gradients are awesome and the passing is pretty dangerous... hang of the side if you dare, but keep your head in!

San Francisco Cable Cars Cable Car Turntable Cable Car Turntable
Powell and Hyde (or Mason) Heading into the city Close passing
Close passing Another pass

Oakdale

A random stop through Oakdale on the way to the Yosemite National Park found a random caboose and the Sierra Railroad's Dinner Train. Not much was happening around the yards, so I didn't hang around long.

Caboose in Oakdale Mendocino Railway at Oakdale Mendocino Railway at Oakdale

Fresno

The initial perception of Fresno indicated little railway infrastructure and life... fortunately I was wrong. After a little false navigation following disused lines I came across 'South Railroad Avenue' which followed the main line. It turns out that there's a junction and then the BNSF depot. Finally some real american horsepower. Santa Fe had always been my favourite railroad (first model train, etc...) and it was nice to see them, although in the amalgamated BNSF livery.

BNSF Locomotive at Fresno BNSF Locomotive at Fresno Stored freight cars at Fresno
BNSF Locomotive at Fresno BNSF Locomotive at Fresno

The last miles on Interstate 5

After Fresno the countdown was on to get back to LA before midnight. The plane to NY was leaving early the next morning and we needed some time to check out Hollywood. Along the way back there were a few freighters hanging around loading sites, one was from Golden State Feed and Grain and another from Rail America.

Golden State Feed and Grain Unused signals Grain silos
Rail America Rail America

And that was it... New York was next.

23Jul/110

Melbourne – July 2011

Prior to setting off on a round-the-world tour (expect posts from random countries), I decided to check out Melbourne one last time. Everything listed below was taken on a typically dreary Melbourne day... boy am I looking forward to summer!

Canal Sidings

These sidings form a repair bay for rolling stock in Melbourne. Often on a Saturday morning one will be able to see damaged rolling stock being brought to these sidings or repaired rolling stock being taken away. I've usually only seen grain wagons and flats being repaired.

8030 at Canal Sidings 8030 departing Canal Sidings 8030+G departing Canal Sidings

The main SG line to Southern Cross Station passes directly beside Canal Sidings and the XPT travels along this times a day on it's two trips to Melbourne.

XPT departing Melbourne

XPT departing Melbourne XPT passing 8030 at Canal Sidings XPT departing Melbourne

XPT departing Melbourne

Dynon Fuel Point

The petrol station at Dynon serves all sorts of customers: V/Line, PacNat, El Zorro, etc... today we see a nice line up of PacNat BG freight locomotives with a single V/Line N Class.

Xs, XRs, As at the fuel point Complete array of locos at the fuel point X XR X

V/Line Standard Gauge Passenger Trains

V/Line has only just re-started it's services to and from Albury/Wodonga after converting 3 N Class, 1 P class and two passenger consists to Standard Gauge. Here we see (what happened to be) an empty passenger consist from the yard heading to Southern Cross to do the midday run to Albury. It ended up returning very quickly as it turns out the service was to be bus-tituted. Something to do with a massive ARTC signal fault on the 'NE SG'.

V/Line Standard Gauge to Melbourne

V/Line Standard Gauge to Melbourne V/Line Standard Gauge to Melbourne Empty SG Set

Empty SG Set

I happened to randomly catch it heading north whilst waiting for the AK cars... The livery really does liven up the photos.

V/Line SG heading North V/Line SG heading North V/Line SG heading North

AK Cars in Melbourne

The AK Cars are run by ARTC to inspect the railways under their control across Australia. This week they ventured in and out of Melbourne testing the continuously-changing NE SG.

2212 on AK duties at Roxburgh Park

4 out of 5 lines occupied Siemens passes 2212 and NR35 Spark vs. Diesel

2212 heads back North

2212 heads back North 2212 heads back North 2212 heads back North

El Zorro Locomotive Testing

This was a random sighting... supposedly 442s6 was about to see the scrappers torch but instead was rescued by El Zorro. This loco will add a little more colour to their already assorted mish mash of locomotives.

T386 leads 442s6 T386 leads 442s6 T386 leads 442s6

9Jul/111

Buying Renfe Train Tickets Online

renfe-main

A few friends and I are heading to Spain over September and we wanted to include a trip or two on their highspeed rail network. After a little google'ing, I had determined the Spanish Rail Company was RENFE and their web site was mildly difficult to navigate and use. The following article lists the notes/issues/warnings that I had gathered from other sites and heeded whilst purchasing online.

Step 1: Create an account

renfe-register

You can do this milliseconds prior to the purchase, but I recommend doing this at the start to raise your chances of a successful purchase. To register your account:

  1. Browse to the RENFE Website and click the Welcome link.
  2. Click the Purchase link, top right.
  3. On the new page, select the Register Me link in the user login window, mid-top right.

You can now start to enter your details. Note that you have to enter a 5-digit postcode (for Australia I just added a zero to the front) and you also have to have at least one symbol and one number in your password. You'll also have to select a fake Spanish Province as it doesn't hide that selection when you choose another country. This doesn't affect your ability to purchase tickets as you do not receive anything in the mail.

Meanwhile, don't be alarmed if the 'Check User' link doesn't work... it didn't work for me, but I continued through and my account was created.

Step 2: Find the timetable

renfe-timetable

Firstly, visit RENFE's Website and choose the "Welcome" link just below the title image. This link will take you to the 'English' version of the passenger timetables page. From here you can now input your departure/destination stations and a date to travel on. Note that this is for inter-city travel across Spain; you can find suburban stations on the Renfe Cercanías - Communter trains page.

Note: You can only purchase tickets 62 days in advance... be warned though, the site doesn't always have the tickets available. You may have to be 50 days or less in advance before they will appear.

Once you've worked out a good departure time, select the Query and Buy link. This will show an extra table stating the 'off the shelf' prices for each class of travel. Don't be scared by these though, you're about to head into the purchasing system where you'll be presented with the 'web fares'. Click the shopping trolley icon and a new window/tab will open with the purchasing website.

Step 3: Starting the purchase

renfe-purchase-select

You'll now be in the purchasing area of the RENFE site. Wait for the initial purchasing page to load; a script will change the departure/destination stations and travel date to what you had previously selected. You can then update this if you want a return journey and can also choose the quantity if you want multiple tickets.

Confirm at this point that you are still actually logged in. The panel in the top-left of the screen should show your full name, as you registered it.

After selecting the relevant details, hit the Search button.

Step 3: Choosing a service

renfe-purchase-blocked renfe-purchase-services

Right, there's quite a few different services offered by RENFE available online. These range from Overnight sleeper "Train Hotels" to the latest and greatest highspeed AVE Trains.

Note that "Estrella" is both a name for the Overnight Trains (if it's in the left-most column) and a 'Travel Class' (if it's in the right-most column) literally translated to "Star Class".

If you see the service you want, but it's marked as "Train Blocked", then don't despair! Chances are RENFE are taking their time with the timetable updates and you are too 'early' (although you may be within the 62 days prior to travel.) I had this for my tickets in September and persistence paid off. The tickets became available around 58 days prior to my travels.

You can find the full list here, but below are the services you'll probably want to purchase:

  • AVE (300km/h)
    'State of the art' highspeed network in Spain. Currently servicing: Madrid–Barcelona, Madrid–Valladolid, Madrid–Levante, Córdoba–Málaga.
  • Euromed (220km/h)
    The Euromed is a slower train with Turista and Preferente classes. You'll find these services between most major cities and they usually come with very good discounts.
  • Alaris (200km/h)
    Again, a service between most major cities which usually stops at a lot more stations than the Euromed.
  • Talgo (160-200km/h)
    Looking quite like a duck/platypus, these relics have been refurbed for smoother rides. They also travel between most major cities, filling in the stations that the faster trains don't stop at.
  • Estrella
    These trains are the overnighters. NOTE that you cannot purchase a bed online! Of three levels offered, Turista and Preferente are seats and Litera is a cabin with 6 reclining seats (potentially into 'beds', but I wouldn't count on comfort.) Other sites have indicated very little sleep had on these tickets. I imagine you can purchase the sleeper cabins over the phone?
  • TRENHOTEL
    These are the real overnight trains... all classes starting with "cama" indicate that you are purchasing a bed. It's been mentioned that RENFE will not mix strangers in a cabin, so purchasing two tickets for a 4-berth cabin will give you space and privacy.

Step 4: Choosing a class

renfe-preferente-error

One note here... I tried to purchase "Preferente" class on a Barcelona to Madrid service and I got the error to the right. I was interested in what I expected to be first class but wanted to get the tickets purchased; instead I opted for "Turista".

  • Turista
    This seems to be equivalent to 'economy class' or 'coach'. All trains have this and it's the lowest (and cheapest) option available. All trains I checked out still had 2+2 seating though... so it can't be too uncomfortable?
  • Preferente
    Don't quote me on this, but I think these are 1st Class seats with a discount... I wasn't able to purchase any though.
  • Club
    Bloody expensive... seems to be first class with no discount and all the options (drinks, food, etc..)
  • Butaca Super.
    No idea... if anyone can provide information on this then please do!
  • Cama Turista
    No idea... if anyone can provide information on this then please do!
  • Cama Preferen
    No idea... if anyone can provide information on this then please do!
  • Cama G. Clase
    No idea... if anyone can provide information on this then please do!

Step 5: Confirming ticket details

renfe-options

The next screen is one of the most confusing. At the top of the screen you will see the trips you wish to take with the classes you have selected. At this point you can choose to switch to another class type if required. Switching between the types and pressing "Recalculate purchase price" will show you what each of the tickets are worth. Chances are you already chose the ticket type in the previous screen and you don't need to adjust this.

There is also a family discount option ("Descuento F.Numerosa") which allows discounts to parties travelling as a family. I don't know exactly how this applies and don't recommend touching it.

Select your final options (seat selection, meals, etc...) and then choose Continue.

I usually don't bother with seat selection for any tickets that I purchase (on any mode of transport...) ...but... for the purposes of this post I'll show you what happens when you tick that checkbox.

Step 7: Credit Card Details

renfe-card-details

renfe-card-details

Ok, the first thing that scared me on this page is the lack of a credit card 'type' selection. You cannot select 'Visa', 'Mastercard, etc... I assume RENFE just knows how to decipher this from the card number you've entered.

You'll notice at the top of the screen that there is a 'Select a card' button... this brings up a blank list (I first expected to select my card type via this.) I freaked out during my first purchase but then realised that it's for storing your credit card details so you don't have to type them in each time. I chose not to do this.

Go through and fill out your details... Skip the 'TEMPO Card' area as that seems to be their loyalty program. You'll need to make sure the number has no spaces, your name is correct and you have the CVV number from the back of your card (it's the last three digits on whatever number exists.) If you don't know any of these details then contact your bank or ask someone who's paid online with a credit card before to help you.

Finally check the 'I agree...' checkbox and hit continue.

Step 8: Seat selection (optional)

renfe-seat-selection

If you didn't choose seat selection then you can skip this step; otherwise, choose your seats...

At the top of the page you'll see the entire consist of the train you'll be travelling on. The buffet car is noted and so are the classes of travel. RENFE will select a car for you to travel in by default, but you can choose another as long as it's marked as the class of travel you have chosen.

Once you've chosen a car you can then select a seat on the bottom half of the screen. Note that anything marked 'X' has already been booked by someone else. Work out where the amenities are and choose the required amount of seats simply by clicking on them.

After selecting all required seats, press continue to start the card verification process.

Step 9: Credit Card Verification

renfe-verification-1
renfe-verification-2

Now comes the tricky part... you'll have a few hoops to jump through here depending on your card issuer/bank. If you've ever bought anything online (not via Paypal) and have seen your bank's "verification screen" then you can expect to see it here too. RENFE, at this point, will attempt to contact your bank and will then hand control over to the bank's verification system. My bank here in Australia presented it's verification screen where I was to click a button, receive an SMS and then type in the code given.

NOTE: The first time I did this my bank's verification screen did not appear! Something timed out somewhere and I got a "This website is not responding..." error. I ended up just hitting refresh (as I knew I hadn't verified the initial payment) and everything then just worked. It's always daunting when dealing with your own hard-earned dollars... but be persistent and it should work.

Step 10: Review and print your confirmation

renfe-complete
renfe-journeys

If you've made it this far then you're in! Congratulations, on this screen you'll have a booking number and trip details. You will also receive an email (if you typed the correct one in whilst registering) with all the details too. There's no need to print this screen; print the email instead.

I never tried the SMS option... there's a radio button that you can select... I imagine you then press the "Print Tickets" down below. I didn't even click that button; I was happy with the email as proof of purchase.

There is a link at the top left to view your 'Journeys'. Click this and it'll show you a short list of your confirmed tickets.

Step 11: Travel.

I'll get back to you on this in August/September 2011.

30Jun/110

Sydney – June 2011

I happened to be in Sydney on Saturday the 25th of June briefly and managed to catch up with the Metropolitan Goods Railway Line between Canterbury and Sydenham.

I'd known about this line from the forums at Railpage and wanted to see some of the privately operated locomotives.

NOHABs at Canterbury

NOHAB (Nydqvist & Holm AB) was a manufacturing company in Sweden that has since gone bust. Independent Rail of Australia (Originally known as Lachlan Valley Rail Freight) based in Minto, Sydney, imported 16 of their MZ locomotives and continues to refurbish them.

It turns out that they decided to pass me at Canterbury Station not long after I'd gotten there.

NOHABs heading via Canterbury NOHABs heading via Canterbury 1437 in the lead

They also own 4717, looking quite dirty. I jumped on the next spark back to Marrickville; 4717 paused long enough at the signal for me.

4717 LE past Canterbury 4717 LE past Canterbury 4717 heading to the Port at Marrickville

RLs at Marrickville

It turns out there was to be enough action here to keep me entertained. Port botany is a dead-end with no facilities to turn an engine, so all locomotives have to reverse else where. It seems that, for the movements I saw, containers are taken down and then the engines return to their bases.

First up, after 4717 cleared, a set of RLs came through. RL302 was leading and paused just on the other side of the junction to Sydenham. The pair then trotted off downhill.

RLs at Marrickville RLs heading back down towards Sydenham RLs turning via Sydenham

After the port line was clear, the NOHABs returned. It would've been a good shot if another locomotive was attempting to head east... I've seen it before where someone has caught another train waiting on the line up from Sydenham.

NOHABs return past Marrickville NOHABs return past Marrickville

The RLs, with RL301 now closest to me, returned to Marrickville and then bounced back to the port.

RLs turned and returning. Heading back to port

81s at Marrickville

A lonesome 81 Class then climbed the grade from Sydenham and wound past Marrickville. I hadn't seen these under steam for quite a long time (Melbourne only really sees them shunting.)
Note that the final container on the train had a piece of cardboard wedged in the handle saying "Don't seal this container."

8132 on freight through Marrickville Don't seal this box?

Central and Surrounds

I then ventured into the city via Central and caught the locals.

V-Set at Central V-27 at Central Xplorer at Central

That night I also tried a few shots of the trams near Paddy's Markets.

Chinatown Trams in ChinatownTrams in Chinatown

Taking the XPT home

The final part of my journey included a trip home on the XPT; although everyone seemed to think I was crazy for doing it. It was actually a really nice ride and there were little slowdowns. The train arrived 2 minutes early to Southern Cross; but the timetable definitely incorporates the trackwork being undertaken.

Quite a few freight trains were passed, for a Sunday, including a random lash-up on a ballast train south of Cootamundra.

XPTs at Central Departing Campbelltown 4701 leading ballast at Cootamundra
XPT at Albury

In the end, I'd do the trip again... the trackwork will be completed one day? I think they can knock an hour or two off the running-time when it's done.

The photo album for this trip is here.

27May/11245

Commandos – Behind Enemy Lines Resolution Fix

Note: Both Commandos - Behind Enemy Lines (BEL) and Commandos - Beyond The Call Of Duty (BTCOD) (Plus a crapload of other versions, see below!) are supported!

Unofficial STEAM support:
Scroll to the bottom and find the comment by Tonelotto with instructions on how to get it going.

You can also use this patch to carry out the Locale hack described here.

Skip straight to the bottom of this post if you just want the application!

An Introduction to the game

A friend and I recently stumbled across the Commandos Ammo Pack ('Behind Enemy Lines' and it's expansion pack 'Beyond The Call Of Duty') at Good Old Games.com and we just couldn't resist downloading it. It did cost US$5.99, but that's absolutely chicken feed when compared to the awesomness of this game.

It's an old game, created in 1999, and could handle resolutions up to 1024x768 for single player; but for multiplayer the resolution was fixed at 640x480. I google'd around a little and saw that one person on a forum had created the Mysoft - Commandos Loader v0.8 which seemed to hoist the application in to memory and then hacked around with variables. I wasn't sure this was the best method and had the main Commandos EXE in IDA Free before too long.

I'd read that it used DirectDraw/3D and started searching for the appropriate functions. Before long I had the AdjustWindowRectEx, DirectDrawCreate and other functions under the microscope. I then opened the EXE up in OllyDbg and started slapping breakpoints everywhere. Before long I'd noticed the pattern:

push    10h
push    1E0h
push    280h

This seemed to be popping up everywhere and co-incidently 280h x 1E0h = 640x480 pixels... the default for the game. I then found code that set the resolution based on those shown in the video settings menu and then the game was doing what I told it.

commandos-512-384 commandos-1024-768 commandos-1680-quit

After a little more google'ing I found that someone else had already gotten to this point. Ferdinand had the hacks there to change the resolutions, but did not have the final piece to ensure that re-loading the game brought the resolution back.

After a little more disassembling I found that the resolution was being loaded at startup from a file on disk... this turned out to be "COMANDOS.CFG" in My Documents. The exact line from the config was:

.SIZE [ .INITSIZE 2 ]

From the config it was obvious that the game was using 'index 2' from the resolution list. Of course, it also meant that it knew how to decipher that '2' to a real resolution from the list in the code. After a little forward and reverse searching from the file loading to the resolution setting I came to the switch statement in the code which had the values hard-coded. I now had 3 points per resolution setting in the code that needed to be changed if I was to write my own utility.

Commandos Resolution Hack Alpha 1

I hadn't liked anything that was already available to do this and so I chose to wrote my own. The application loaded the EXE into memory, read out the resolutions stored, audited that they were all in sync and then allowed the user to select a new resolution per slot. If the resolutions weren't the same then you would get a warning, but this would have been corrected on the next resolution hack.

commandos-file-selection commandos-resolution-hack

This worked fine, but I found it pointless to specify four separate resolutions when you only really needed to specify one. I was more in for the challenge of allowing all four to change, rather than the practicality.

Testing and more bugs

So, it all worked... I then closed the game, re-opened it and found that it loaded up at 1024x768 instead of the 1680x1050 resolution I had set. I closed it again and looked at the configuration file; the setting had indeed changed back to '2' instead of '4'... but I hadn't touched it! I then loaded the game again and it was back to 1680x1050... closing and opening brought it back to 1024x768... the flip-flop continued.

So... what did this seem to mean? I had overlooked the storage of the resolution configuration. If the indexed resolution was read from the file, then it would have to be written back as an index. I went back in to the disassembler and searched for anything relating to writing 'SIZE' into the configuration file. The logic in the game was then obvious: it carried out an "if less than X but greater than Y" across the 'stock' resolutions and then stored the relevant index. This complicated my approach and confirmed that I really should only bother adjusting the 'fourth' resolution in the list. There was no point allowing the user to re-order the resolutions as this code then wouldn't work. The fourth resolution would need to be the only one customisable and the value must be greater than the third resolution at 800x600.

Commandos Resolution Hack Alpha 2

So, with this in mind, I wound the application down to just editing one resolution that had to be higher than 800x600. This meant that the internal configuration saving would work and the user would just have to select the final resolution in the list. Note that this only affected single player... the multi player resolution would still be a separate setting.

commandos-final-version

Everything was now working great... except the drawing issues above 1024 resolutions...

Drawing bugs

So, the game obviously wasn't meant to be played with a horizontal resolution greater than 1024 pixels; rendering artifacts started appearing when higher resolutions were used. Fortunately, the game is quite dynamic when it comes to rendering the screen and menus. Trawling through the code I could see that it was trying to find a BMP that matched the resolution, even using the resolution as the file name. Ferdinand had also worked this out and even has a list of assets downloadable for higher resolutions.

Commandos stores all of its graphical assets in a file named 'WARGAME.DIR' and references this when the game loads. I started looking into modifying this file via my program but realised it would be wuite a task to decipher and re-pack. Fortunately, some clever fellows across the world have created the necessary tools to extract these files. DirExtractor allows us to expand the DIR files and, once in the Commandos directory, the game itself will actually use the extracted versions if you remove the WARGAME.DIR file. This then meant that I could use my app to call DirExtractor, extract the files and then modify them where required to ease the majority of graphical glitches.

commandos-1680-resolutions commandos-1680-menu commandos-1680-loading

Required Graphical Modifications

  • A single change to the fourth resolution string in DATOS\MISIONES\GLOBAL.STR to whatever the custom resolution has been set to. This can be found by searching for the token OVI4 and then replacing the string following.
  • The creation of the menu background. This has to be a Bitmap file named MENU####.BMP where the #### is the horizontal resolution of the screen.
  • Build a WAD file for the game-play interface. This WAD is named via the resolution (i.e. 1024X768.WAD) and contains values that tell the game how to render the interface. I created a one-size-fits-all file that ensures that the graphics are wide/long enough for the screen resolutions (max 1920x1920) and the application simply renames the file and ensures that it is available to the game.

A final glitch

There was only one drawing issue remaining after this... any resolution over 1400 meant that maps thinner than the overall monitor width would not re-draw the areas that they could not cover. You can see this in the following screen shots.

commandos-bad-map

Fortunately you can press '+' and '-' in-game to zoom in and out. What this meant was that the user could stop the map from clipping by adjusting the zoom. I took this as a suitable workaround at the time.

commandos-1

commandos-1

Smeared resolution?

It seems that some laptop resolutions are a little out-of-whack. I previously had a Samsung Ultranote with resolution of 1366x768, but windows reported that it could also run at a resolution of 1360x768.

It turns out that if you choose the wrong one (although it may seem the right one if that's your current windows resolution) that you'll get the following display:

commandos-smeared-menu

commandos-smeared-res

Simple fix: Try another resolution... it'll work eventually!

And you thought it was going to be this easy?

So, I had the app working great for the modification of the GOG version of the EXE. It turns out that there are many more versions in the wild. It also gets worse as there is another patch here that fixes up a whole lot of other issues in the game. Fortunately it seems that the EXE from the above link is the exact same as the EXE from GOG? Either way, I've tested it and my hack works on it perfectly.

Due to the above, I started a list of EXEs for the game and then began deciphering them (as I knew the basic items to change) to allow my application to work with them.

Items in bold are those that come from GOG.com.

Game Version File Size Supported
Commandos - BEL Demo 2,452,992 bytes Works..
Commandos - BEL German v1.0 2,469,376 bytes Works, Asks for CD (Language issues, I'd imagine)
Commandos - BEL Spanish v1.0 2,469,376 bytes Works?
Commandos - BEL Spanish v1.05 2,469,888 bytes Works?
Commandos - BTCOD Spanish ? 2,696,600 bytes Works?
'Sold Out' v1.1 2,479,104 bytes Works fine. Speed issues with game (known issue)
GOG.com Ammo Pack v1.1 3,715,072 bytes Works perfectly!
Commandos Ultimate Fix v1.1 3,715,072 bytes Works perfectly!
Commandos - Beyond the call of duty ? 3,133,440 bytes Works perfectly!
Commandos - BEL Russian ? 2,470,400 bytes Works fine. Speed issues with game (known issue)
Commandos - BTCOD Russian ? 2,968,576 bytes Works fine. Speed issues with game (known issue)
Commandos - SINP v2.3 2,482,688 bytes Works perfectly.
Commandos - SINP Chinese v2.3 2,313,216 bytes Does not write out chosen resolution to configuration file. You should only change the resolution via this hack!

My application was then built to determine the EXE via file size (of course, this isn't fool-proof) and then hack appropriately.

Commandos - Beyond The Call Of Duty

So, this was just an update to the main game... turns out the code was slightly different, but still workable with my current program structure. After about 6 hours debugging all was working! Enjoy!

commandos-btcod-1

commandos-btcod-1

Commandos Hack v1.2

The final release contains the following features:

  • Support for all versions known above. (Note that the Demo and German versions don't actually save their configs to disk; we therefore hack the initial startup resolution.)
  • Resolution list options based on monitor capabilities.
  • Both EXE and WARGAME.DIR are backed up.
  • A one-size-fits-all menu background has been included.
  • German file encoding is preserved when the text is changed.
  • Resolution menu text shows the selected resolution.
  • Compatibility mode now checked to allow proper resolution and disable scaling.
  • The Locale hack from here has also been added.

commandos-hack-final

Note: You need .NET Framework 4.0 to run this, download it here.

Download the application here.
And you can also download the .NET source code here.

Meanwhile, if you got a lot out of this app, then feel free to donate!








And that's a wrap... go use every pixel your monitor can produce and play the game!

16May/110

Creating two more MAME Controllers

I've since realised that, after building the original two MAME Arcade Controllers, I've needed two more to really re-live the old classic games. I suppose one more would've been OK for games like Rampage, but TMNT, Simpsons Arcade and Sunset Riders need all four players... so... the following lists the relevant information to build controllers 3 and 4.

Sunset Riders

It turns out F12 saves snapshots of MAME games... so I couldn't resist...

Sunset Riders Sunset Riders Sunset Riders
0005 Sunset Riders Sunset Riders

Key Mapping

Below lists the mapping for the two new controllers to be created. I went ahead and used the default keys from MAME plus whatever else was free...

NOTE: Out-of-the-box MAME does not specify buttons 4,5,6 for Players 3 and 4! You can set these very easily in the 'default' config by using the basic MAME GUI (run mame.exe without any command line options)...

Button Player 3 Pins Player 4 Pins
Joy UP I 6, 22 Numpad 8 8, 22
Joy LEFT J 7, 21 Numpad 4 4, 23
Joy DOWN K 6, 21 Numpad 2 8, 21
Joy RIGHT L 5, 21 Numpad 6 14, 23
Button 1 R-CTRL 13, 20 Numpad 0 8, 24
Button 2 R-SHIFT 10, 20 Numpad . 14, 24
Button 3 ENTER 1, 20 Numpad ENTER 12, 21
Button 4 / 3, 26 Numpad + 12, 22
Button 5 . 5, 20 Numpad - 12, 26
Button 6 , 6, 20 Numpad * 12, 20
Player Button 3 16, 19 4 11, 19
Insert Coin 7 7, 19 8 6, 19

Building the other two controllers

I bought cheaper controls for these two... but to no real benefit. I did save AUD$10, but I don't really like the button microswitches. The buttons aren't as tall and they do look cheaper. They're also a lot less 'clickier'. On the positive side: the short-stick joysticks feel nicer during game-play and are a lot more sensitive.

Player 3 and 4

Player 3 and 4 White vs. Black LITEON Board?

The build of these two followed the exact same path as the previous two (see the previous post) using cheap Microsoft Keyboards. It turns out that they were now a different colour (White vs. Black) and I decided to replace my current keyboards on other computers with the new ones. I therefore used a standard black MS Keyboard for Player 3 and a 'Microsoft Comfort Curve' for Player 4.

The MS Comfort Curve had a completely different matrix and the circuit board inside was much easier to solder to. Either way, the process was still the same in determining the pins and then wiring everything up. Testing was made a lot easier as well as I found the below testing applications to work out exactly what I'd messed up :)

Player 3 Player 4 All 4 lined up

After running out of solder and then later butane I got them together and we gave them a go. All went well until Players 1 and 4 hit magical key combinations... It seems that, although the keyboards are separate devices, you can still produce an ALT-ENTER or CTRL-ALT-DEL by having each player pressing each of the keys separately. This has since been remedied in the final section of this post!

Testing your new creation

I found out that Windows 7 (and possibly Windows Vista?) but not Windows XP has the mskey.exe keyboard test application (I have since found out that you can Download the Intellisense Software here which contains this application.) It came in very handy until I plugged 12v into a USB hub and cooked the HDD in my TV-pc (luckily only the HD, the PSU managed to protect everything else!) and lost my Windows 7 install. For Windows XP systems (of which all my computers are now back to) I downloaded and used the PassMark KeyboardTest application. At first, the Google search result made the application look like a typing tutor, but after downloading I realised it was exactly what I needed.

Microsoft Keyboard Diagnostics

PassMark KeyboardTest

MAME Configuration

So, as previously mentioned, MAME doesn't specify Buttons 4,5,6 for Players 3 and 4 by default. I suppose there aren't many games that have more than 3 buttons for all four players? I can't think of any... but my memory is quite hazy as to what 4-player games Combat Zone had back at Tuggeranong Hyperdome.

Either way, we've specified them above and we also need to make sure they map to the correct player/keys in MAME. Here's a snippet for Player 4 in my default.cfg:

<input>
 <port type="P4_JOYSTICKRIGHT_UP">
  <newseq type="standard">KEYCODE_6PAD KEYCODE_8PAD</newseq>
 </port>
 <port type="P4_JOYSTICKRIGHT_DOWN">
  <newseq type="standard">KEYCODE_2PAD KEYCODE_6PAD</newseq>
 </port>
 <port type="P4_JOYSTICKLEFT_UP">
  <newseq type="standard">KEYCODE_4PAD KEYCODE_8PAD</newseq>
 </port>
 <port type="P4_JOYSTICKLEFT_DOWN">
  <newseq type="standard">KEYCODE_2PAD KEYCODE_4PAD</newseq>
 </port>
 <port type="P4_BUTTON4">
  <newseq type="standard">KEYCODE_PLUSPAD</newseq>
 </port>
 <port type="P4_BUTTON5">
  <newseq type="standard">KEYCODE_MINUSPAD</newseq>
 </port>
 <port type="P4_BUTTON6">
  <newseq type="standard">KEYCODE_ASTERISK</newseq>
 </port>
</input>

As you can see, the default.cfg only adds in controls we have overridden... the others must be hard-coded into mame.exe. Drop the configuration file in to your mame/cfg directory (note that you may want to check your file first as you could have other customisations!) and then you'll have the appropriate settings ready to go!

Diagonals and 4-Way Joysticks

Right, I couldn't work out why I couldn't get 'Steve' in 'Sunset Riders' to shoot on the diagonal... usually this was carried out by holding down the Up and Left (or Right) keys on the Keyboard, but it wasn't working. I scoured the internet and initially thought it was an issue with the way I'd wired up the joysticks.

Sunset Riders Sunset Riders Sunset Riders

It turns out that MAME has added in the ability to assign a separate key for the diagonal movements. This is great if you have an 8-way Joystick with actual individual microswitches on the diagonals, but I have a 4-way and I cannot, without logic circuits, wire up another key to activate when two of the direction microswitches are closed. I did actually start thinking of logical OR/AND gates to fire the specific keys when the direction goes diagonal, but this would require re-work on the sealed controllers. :)

mame-config

So, I went in to MAME and then mashed the keyboard on the configuration screen. It turns out that you can assign multiple keys to a direction. This then made life easy... I would make Player 1's "Up/Left" key 'Up' + 'Left' instead of the 'I' key on the keyboard.

After testing this new configuration I realised it wasn't actually MAME that was the problem! It turns out that there was an actual physical issue with the initial two joysticks I bought when compared to the second two...

Arcade Joystick differences

So, the diagonals worked on the new joysticks I bought... they seemed to be a lot happier at pressing two directions at once. Unfortunately, the original joysticks only really wanted to go one way at once... After a little investigation it turns out that the plastic spacer/washer that slides onto the joystick stem was not wide enough (circumference-wise) to actually activate two microswitches at once. I'd also misplaced the original 'extra' components from the intial build and therefore didn't know if wider spacers existed? Either way, I had to make the spacers fatter to ensure that diagonal movements could be easily made.

In the end I cheated and used duct tape around the spacer at the bottom of the stick to make it's circumference wider. This meant it was more keen to press two microswitches at once and the world was a happier place!

Spacer on original Joysticks Spacer Bigger spacer

The sticky-tape-fix was then tested for Player 1 and worked. I then did the same for Player 2 but had the controller back open in seconds after playing Bomberman as it turns out it was now too happy to go diagonal instead of 4-Way. Removing just over one layer of tape from the spacer on the joystick balanced out the circumference vs. microswitch equation and made the joystick much more responsive. Your mileage will vary with how much tape is required based on the sensitivity of the microswitches and how much travel/space you have between them and the center stick.

The verdict: Windows short-cut keys kill gameplay

The next step was to reconfigure any keys on the controllers to not use any modifier key (CTRL,ALT,SHIFT,ENTER) so as to not activate shortcuts during gameplay. When Player 1 and Player 4 pressed certain buttons (specifically ALT-ENTER) the MAME window would restore and, of course, it was possible that all four players could do a perfectly orchestrated CTRL-ALT-DEL and throw Windows XP to the Task Manager.

To do this I had to re-solder buttons on Controllers 1, 2, 3 and 4 to the nearest free keyboard button. Fortunately the Numpad had more than enough nearby keys free and there are still letters of the alphabet unused near Player 1's keys. The layout of buttons on the keyboard did not have to make sense to a human user and so any free buttons were used if the wiring was easier.

The Final Re-Mapping

So, in the end I re-mapped the modifier keys and also removed the duplicates between Players 2 and 3. Edits are in bold... NOTE: You must UNMAP 'T' from the 'Other Controls' area otherwise when Player 1 hits Button 2 you may receive a 'Tilt' message and game restart.

Button Player 1 Pins Player 2 Pins
Joy UP UP 12, 24 R 11, 22
Joy LEFT LEFT 12, 26 D 16, 21
Joy DOWN DOWN 4, 26 F 11, 21
Joy RIGHT RIGHT 8, 26 G 11, 24
Button 1 E 16, 22 A 18, 21
Button 2 T 11, 23 S 17, 24
Button 3 C 16, 20 Q 18, 22
Button 4 V 11, 20 W 17, 23
Button 5 Z 18, 20 U 7, 22
Button 6 X 17, 20 O 5, 22
Player Button 1 18, 19 2 17, 19
Insert Coin 5 11, 25 6 7, 25
Button Player 3 Pins Player 4 Pins
Joy UP I 6, 22 Numpad 8 8, 22
Joy LEFT K 6, 21 Numpad 4 4, 23
Joy DOWN J 7, 21 Numpad 2 8, 21
Joy RIGHT L 5, 21 Numpad 6 14, 23
Button 1 B 11, 26 Numpad 0 8, 24
Button 2 N 7, 26 Numpad . 14, 24
Button 3 M 7, 20 Numpad / 8, 20
Button 4 / 3, 26 Numpad + 12, 22
Button 5 . 5, 20 Numpad - 12, 26
Button 6 , 6, 20 Numpad * 12, 20
Player Button 3 16, 19 4 11, 19
Insert Coin 7 7, 19 8 6, 19
Download the configuration file here.
This configuration overwrites the diagonals for Player 1 and adds/corrects all of the other mappings listed above.

And this is now to be tested in gameplay... I've done the re-wiring and have tested individually but have done no actual thrashing with MAME.

The End

And that's that... it was enough fun playing with Player 1 and 4 making sure not to mash the same buttons at the same time... but it should be a lot better now once I organise the beer and the people to play... will see how we go!

9May/110

Usual suspects: DERM58

May 7th saw the Diesel Electric Rail Motor Preservation Association of Victoria Inc run another tour with their prized DERM58. This time it was out on the freight BG to Seymour with a return trip via the passenger line through Essendon. I woke up at sparrows-fart on Saturday to see it on the viaduct over the Maribyrnong river near McIntyre Loop.

The weather, as per Melbourne, was playing hard-to-get and it was bloody freezing before the sun came up. There was a lovely pink sunrise which I tried to capture before realising I'd remembered the XPT arrival times wrong... I heard it coming and just managed to get a dodgy shot.

DSC06919 DSC06926

The next train wasn't for an hour... so I entertained myself by finding a good location where I could use the tele-lens and the available sunlight. It turns out that on the high-way side there is a nice incline where you can get above track-level with a great view of the viaduct. You can also see the signals in both directions to know when something is approaching.

After being entertained by quite a few noisy birds...

DSC06929 DSC06975 DSC06990

...I was greeted by howling NRs on a superfreighter heading north...

DSC07012 DSC07017 DSC07023

The XPT was to return next... it did and it wasn't hanging around. Fortunately the sun came out to ensure I could match a shutter speed with the train's speed.

DSC07039 DSC07046 DSC07049

It was then about a 40minute wait for the DERM to arrive... during this time there were multiple acts of stupidity by various forms of wildlife.

DSC07050 DSC07055 DSC07057

And then the DERM arrived...

DSC07061 DSC07069 DSC07080
DSC07083 DSC07089

The next train was to be a southbound superfreighter in an hour. I decided that the weather wasn't getting any better and so started making my way back to the car. Of course, if anyone had looked in the long shots of the DERM58, you'd have seen that the southbound signal was at clear... these things are completely hard to trust, but it turns out that if you see a green in this area then you should hang around.

I'd made it half-way back to the car when I heard a very nice howl from the north... as I turned around QR came hurtling across the bridge with an awesome lashup of LDP-009 + 6005 + 6002 + LDP-008.

DSC07095 DSC07097 DSC07098

Supposedly it held pace all the way into Sunshine and scared a track gang working around the corner... I'm not surprised.

I headed to Kensington in the afternoon to see the DERM return via the passenger lines. There's a nice spot near the Allied Mills where you can see the lines off to the West as well.

DSC07117 DSC07134 DSC07137 DSC07145 DSC07149

And that was that... it was cold and wet and any further chasing would have been futile. I'm still learning the correct approach with photographing under low light conditions, but am pretty happy with how the above shots came out.

2May/112

Playart HO Scale Series 0 Shinkansen (4-Car Set)

As luck would have it, I managed to stumble across this set a model train/toy swap meet over the weekend. I'd never seen anything by Playart before and was not expecting to see a HO Scale Shinkansen. I purchased a bit of track with it as I had only had N Scale on hand.

0 Series Shinkansen Passenger coupling Close up

I gave it a quick run on some flex-track with a 12v supply I had lying around. It was noisy, but for something of its age, moved quite well.

End car front bogies Rear dummy Both end car end bogies

Both end cars pick up power through their front bogie and both have internal lighting. It seems to be a standard incandescent light bulb and it actually lights up the entire nose of the train... makes it look very toy-ish... I would actually stop this from happening if I was to run these full-time, but I have no HO layout.

Comparison to N Scale Comparison to N Scale Top down

Either way, this is a cool set... and I was very impressed to find out that some company (I believe they are French?) made this back in the 70s/80s. As written underneath, they were made in Hong Kong.

Car One Car Two Car Three
Car Four

It turns out that the company also made a Series 485 EMU which reminds me of the Kita Kinki in Kansai.

There was also an Endou Vista 3-Car EMU in N Scale which I couldn't recognise (looked like something Kintetsu or Meitetsu...) which I'll try and pick up next time... information on it is here, here, here and here. And yes, it's Kintetsu.

28Apr/110

Echuca, Victoria

route

It was the ANZAC/Easter 5-day holiday and Steamrail were to make an appearance at Echuca in Mid-North Victoria... so what better way to catch them than by making a loop of it and attempting to see traffic on nearly all lines serving Melbourne.

Google maps, as per usual, allowed me to set a good path and also calculated times not-too-far-off from the real-world equivalents. I wanted to get out to Manor Loop, Gheringhap Loop, Bacchus Marsh (to see the massive horse shoe), Bendigo and then on to Echuca/Moama. I also, on the way back wanted to see the Main South to see what super freighters were loitering around. Chances are I would also intercept the XPT as some point.

The trip started damn-early on Good Friday in an attempt to see traffic on the Melbourne-Adelaide railway line. The first stop was Manor Loop and there was nothing around and no green signals. As it was also 6am, it was still too dark for any good shots. I therefore continued on to Gheringhap and was welcomed by green up signals and then a QR freighter with LDP004 at the lead.

LDP004 leads through Gheringhap LDP004 leads through Gheringhap LDP004 leads through Gheringhap

I loitered for a while longer, referencing the Gheringhap Loop Sightings and the ARTC timetables for hope of another train, but nothing came about. Back on the road, I headed towards Bacchus Marsh. As I approached the horse-shoe railway alignment a V/Locity rounded the bend, but the lighting and traffic didn't allow for a photo. I stopped for fuel and breakfast and then proceeded through Gisborne. Here I met the BG rail to Bendigo, but it doesn't happen to be too visible from the road. The single train sighting on the morning saw me push right through to Bendigo and arrive at Echuca earlier than I'd told the motel. I did stop at Elmore along the way and remembered how difficult it was to chase V/Locities.

V/Locity arrives at Elmore V/Locity arrives at Elmore V/Locity arrives at Elmore

At around 3pm I headed in to town to check out the sights and was impressed with Echuca's Yard and infrastructure.

Echuca to Moama line Silos near Echuca Station At level crossing near Echuca Station
Silos near Echuca Station PacNat depot/wagons next to Echuca Station V/Locity departing Echuca Station

After tiring out completely from a huge walk, I grazed on a parmigiana (sorry Victoria, I bought it in NSW) and then slept early. The alarm went off at 3:20AM and I was back at Echuca Station by 4AM.

Echuca at 4am One very quiet station

Not much was happening... so I headed to the level crossing at the entrance to the yard... at around 4:15AM there was a gloomy headlight in the distance. Then the drivers decided no one needed to sleep and let loose with the steam whistle. The consist made its way across the crossing and into the station.

Steamrail makes its entrance R761 paused at Echuca R761 paused at Echuca
R761 paused at Echuca R761 paused at Echuca R761 at Echuca Station at 4:30am

It was then back to bed to be up in time for the first shuttles of the morning. I made it back to the North end of the station in time for the consist to leave but it so happened that the train went in the other direction. Quite a few of us were fooled and it does make you wonder who you can trust when information is so freely available on a whim.

4-6-0 vs. 4-6-4 R761 returns from a shuttle to Strathallan

The scenery around town wasn't the best... so I headed out to Strathallan the back way... after taking my poor little MR2 over a nasty dirt road I arrived at a seemingly popular level crossing. I was soon to find out why: The shuttles were terminating not 50 metres further on and the scenery was fantastic.

Steamrail performing the second shuttle for the day R761 ready to return to Echuca Steamrail returning to Echuca
R761 ready to return to Echuca R761 ready to return to Echuca R761 ready to return to Echuca R761 leads the return to Echuca

After this I returned home via the main south to be totally disappointed by track work. The employees around Avenel even went to the effort to trigger the level crossing gates intermittently in order to have a good laugh. I could've been more jovial towards it but it was my bad for not even asking them what was happening around the tracks.

You can see the whole album here.

11Apr/110

DERM 58 around Melbourne

The Diesel Electric Rail Motor Preservation Association of Victoria Inc has just recently gotten their DERM 58 back on the rails. This rail-car was built in January 1930 at Newport Workshops, Victoria under license from Electro Motive Company. The association is now running tours with this vehicle across the Victorian broad gauge and this past Saturday, the 9th of April, saw the unit head from Newport to Pakenham, Pakenham to Bacchus Marsh and then back to Newport via Southern Cross station.

I happened to be in the vicinity at SCS and FSS for a few shots.

DERM 58 at Flinders St DERM 58 at SCS DERM 58 at SCS

Knowing it was heading out to Bacchus Marsh, I headed out to Rockbank to get a shot of it against some great countryside.

DERM 58 approaching Rockbank DERM 58 approaching Rockbank DERM 58 approaching Rockbank

They turned it at Bacchus Marsh and then I caught it again on the way back through Rockbank.

DERM 58 at Bacchus Marsh turntable DERM 58 passing Rockbank DERM 58 passing Rockbank

The engine sounded quite nice and they had some good speed up when heading in to Rockbank. I can only congratulate their efforts and will enjoy seeing it out on the rails more... their next trip is on May the 7th to Seymour. Check their site for more details.