blog.world3.net

Making a one session temp folder in Windows

30/05/2010 – 17:16

Back in the Amiga days we had a RAM disk. It was perfect for storing all kinds of temporary files as it was extremely fast and would be cleared every time the system rebooted. Windows doesn’t have anything like that.

I found a way to make something similar. I use a temporary folder on a hard drive. It’s not as fast as RAM but it is cleared on reboot by having the following script run at shutdown:

rmdir /S /Q g:\temp
mkdir g:\temp

Basically delete the directory recursively and re-create it. Simple but effective. You can assign a drive letter to the directory too.

By mojo | Posted in windows | Comments (0)

BBC Master Compact keyboard pinout

16/05/2010 – 23:42

I’m working on a project involving the keyboard from a BBC Master Compact. I couldn’t find an accurate pinout on the web anywhere so I got my multimeter out and mapped it.

 LED Power     01 - 02       Column
 Row           03 - 04       Break
 Row           05 - 06       Row
 Column        07 - 08       Row
 Column        09 - 10       Column
 Column        11 - 12       Column
 Column        13 - 14       Column
 Column        15 - 16       Column
 Column        17 - 18       Column
 Row           19 - 20       SHIFT+CTRL
 Row           21 - 22       Column
 LED Caps      23 - 24       Column
 LED Anode     25 - 26       LED Shift Lock

The LEDs all have suitable resistors on them and can run directly from 5V. Break is pulled up by the same line as the power LED uses for 5V so is effectively on it’s own row. Inside the BBC it is used to trigger a hardware interrupt IIRC.

The SHIFT+CTRL pin (20) is special. These two keys use diodes that allow them to be read by pulling lines 21 (SHIFT) and 24 (CTRL) low in turn.

EDIT: Made some minor corrections

By mojo | Posted in hardware | Comments (0)

Bliss Box violating my copyright, GPL and more

13/05/2010 – 17:26

I just spotted this:

http://spawnlinux.dyndns.org/Bliss-Box/technical.html

It violates my copyright on some of the images such as the schematic and connector diagrams. It also violates the GPL by using V-USB and not publishing the relevant code. Chances are it probably uses some of my GPL’ed code, and the author admitted that it is based off some of Ralph’s code too (also GPL).

I emailed the guy but he is refusing to give any attribution, publish anything or provide any links back to the relevant sites.

Since he used his own server in dyndns I tracked him back to somewhere in Florida, using Warner Cable via Road Runner. I have sent complains to both of them.

By mojo | Posted in electronics, Internet, law | Comments (0)

CD32 pad support added to the Retro Adapter

09/05/2010 – 19:14

Just finished adding support for CD32 gamepads to the Retro Adapter firmware. I discovered a couple of interesting points.

1. The logic ICs used are really slow. I need a 75μs delay after the latch line changes before starting the clock and approximately 50μs before reading on every clock cycle. The shift register is a 74LS165 and the datasheet (from 2000 so ~8 years after of the CD32) says it will run at 20MHz with propagation delays in the low tens of nanoseconds. I suppose performance must really have improved in the 90s, or C= used low performance ICs, or there is some issue with the PCB/wiring capacitance.

2. The controller is not nearly as bad as I remember it. It’s no Saturn pad but it works reasonably well and the D-pad is similar to Sega ones. It’s better than a NES pad anyway.

By mojo | Posted in electronics | Comments (0)

MAME and paddle controllers

03/05/2010 – 21:02

I just got a Sega Master System paddle controller working with the Retro Adapter. It works perfectly but there is a compatibility problem with some MAME games I had not anticipated.

I tried to use it with Arkanoid. That game uses a spinner control which can rotate endlessly clockwise or anti-clockwise, unlike a paddle which has a set range it can cover (typically 360 degrees). MAME does not support absolute positioning for spinner controls (or dials as it calls them). The Sega controller reports back a position from 0 to 255 but MAME needs left/right pulses as you would get from a decoded optical Gray code sensor of the type commonly used in mice.

Apparently absolute positions are usable with mice so I will try to set the controller up in that mode tomorrow.

This kind of problem seems to be common with emulators.

By mojo | Posted in electronics, hardware, Retro Adapter, software | Comments (0)

CA-42 as USB to RS232 converter 5V signal compatibility

26/04/2010 – 00:23

The Nokia CA-42 cable is well known as a cheap USB to RS232 converter. You can get them on eBay for about 1. One thing that was not clear from most of the articles about it is how tolerant the signalling voltage can is.

According to the datasheet for the IC used in the CA-42 (a Prolific PL2303HX) it supports both 3.3V and 5V signals. The CA-42 provides 5V and 3.3V and the PL2303HX outputs 3.3V on it’s TX line, but putting 5V on the RX line is specifically mentioned in the datasheet as being safe.

As for the power lines the 5V is probably direct from the USB port, less the amount used by the PL2303HX, so it’s likely to support a few hundred milliamps. The current limit of the 3.3V line is unknown but most likely in the 50-100mA range at best.

By mojo | Posted in electronics | Comments (0)

AVR / electronics quick reference sheet

23/04/2010 – 18:31

I am working on a quick reference chart (cheat sheet). It’s by no means done but a post over at Adafruit made me think to post it: quickref.pdf

By mojo | Posted in avr, electronics | Comments (0)

Hori Famicom trackball protocol

22/04/2010 – 23:34

I just finished adding support for Famicom/NES trackballs to the Retro Adapter firmware. I can now use it as a mouse :-)

The protocol is quite simple. Data is read from the controller in the same way as a normal gamepad. The first 8 bits are the same, followed by 4 bits of y axis offset and 4 bits of x axis offset. Finally there is an ID nibble of 1000. The axis data is in two’s complement format, most likely just the output from some up/down counters.

I opened the trackball up for a look and it uses a custom Hori controller IC labelled “TRK-81-R01″ and “BU3219 844 315″. The only other components are two optical encoders for the ball, two switches (high/low speed, left/right handed), a few resistors, a single power supply capacitor and a 4093 Schmitt trigger. The two ICs are both DIP format. The PCB is single sided and does not use any jumper wires; however there is a patch wire which corrects a off-by-one-pin wiring error. The whole thing could be done in pure logic ICs but Hori must have thought it was cheaper to use a custom IC. Considering the age and limited popularity of the device that’s somewhat surprising.

Unfortunately the deletionists destroyed the Wikipedia article on Hori.

By mojo | Posted in electronics, hardware | Comments (0)

Famicom controller port pinout

19/04/2010 – 00:02

I am in the process of adding support for various Famicom controllers in the Retro Adapter firmware. I have a trackball and a mahjong controller I am working on. I thought it would be easy enough to find the Famicom controller port pinout online, but both of the pages I found (here and here) are wrong.

The correct pinout is:

 1 - GND
12 - Latch
13 - Data
14 - Clock
15 - 5V

There are some other lines connected to the microphone input, but I didn’t trace them. The controller I have has two PCBs held together with wire links so I could not see the markings on any of the ICs or even where many of the traces went. The controller has autofire which works well, although the two speed settings both seem quite fast. My guess is that they are clocked by the latch line so speed would depend on how fast the game reads the controllers.

By mojo | Posted in electronics, hardware | Comments (2)

Playstation 2 controller I/O error

12/04/2010 – 18:49

I have been tracking down the last few bug with the Saturn/SNES to Playstation converters. It turns out that some revisions of the PS2 and one PS2 to XBOX 360 converter both have messed up timing.

The acknowledge pulses come after the next data byte has started. Official controllers can cope with that, but some third party ones don’t work. I’m fairly sure it’s an error as Sony fixed it after a couple of minor revisions. I suppose the probably noticed that some third party controllers didn’t work on one port of the console.

By mojo | Posted in electronics, microcontrollers | Comments (0)
Page 5 of 19« First«...34567...10...»Last »
たとえ溺れても梦はゆめでしかない
  •  

    February 2012
    M T W T F S S
    « Jan    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Categories

    • audio (1)
    • avr (20)
    • BBC (1)
    • electronics (29)
    • genius (4)
    • hardware (22)
    • idiots (39)
    • Internet (21)
    • law (20)
    • microcontrollers (12)
    • networking (17)
    • politics (29)
    • privacy (19)
    • Retro Adapter (5)
    • security (17)
    • software (32)
    • Uncategorized (18)
    • windows (25)
  • Archives

    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • July 2011
    • June 2011
    • May 2011
    • March 2011
    • January 2011
    • December 2010
    • November 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • November 2005
  • Links:

    Main site: world3.net

    Electronics: denki.world3.net

WordPress | Sandbox