In the USA, Kingston supports cross-shipment. So I already have my replacement RAM. Two days later.
With a lifetime warranty and such speedy RMA/warranty service, I think they’ve earned my money for life.
Posted by Trixter on March 30, 2007
In the USA, Kingston supports cross-shipment. So I already have my replacement RAM. Two days later.
With a lifetime warranty and such speedy RMA/warranty service, I think they’ve earned my money for life.
Posted in Technology | Leave a Comment »
Posted by Trixter on March 28, 2007
I’m rewriting the 8088 Corruption player for the talk I’m giving at Block Party. No doubt this is a form of procrastination (I haven’t even done any PowerPoint slides yet) but I also have a fear of the player crashing when I’m showing it off, which would be a serious blow to my fragile ego. For one particular demonstration, I was going to wow the audience with a double-rate version of Corruption. Yes, 60 frames per second on an XT. The memory speed is there, but there’s so little CPU time left over that the poor disk can’t keep memory filled, and it rebuffers constantly — every four seconds, which is hardly fun to watch.
(This is going somewhere; trust me.)
Although it would be “cheating”, I have a hardware LIM EMS 4.0 board in my 8088 with 2MB of RAM in it. Last night I started to write a version of the player that buffered to EMS, then to system RAM where it could be transferred to CGA RAM. I figured, hey, maybe I can delay the rebuffering for a few more seconds for the presentation so I don’t look like an idiot.
I found that doing so was slower than simply reading the data from disk right into regular memory. You read that correctly: RAM buffering was slower than hard disk buffering. WTF?
I thought about why this might be, and when I figured it out, I started laughing. It’s a perfect example of just how wrong it is what I’m doing. Here’s the explanation:
Do you see where this is going? I’ve put a hard disk in my machine whose transfer speed, thanks to copying help from the DMA controller, exceeds the CPU’s ability to move memory around. Let’s word that another way in case it’s not obvious: The hard drive is faster than the RAM.
That’s just wrong.
It is probably the only configuration in the entire IBM PC/compatible family where this is the case (where the hard drive is faster than RAM). Any 286 or higher, with its 16-bit memory accesses, would be faster at moving memory around. Crazy upside-down world of 8088 hardware!!
So I’ll use this newfound realization to write a DMA version of the player to keep memory filled while playing, right? Nope. The only way to do that is to switch to reading absolute disk sectors, and that means the player would work on my machine only. Not an option.
Posted in Programming, Vintage Computing | 4 Comments »
Posted by Trixter on March 28, 2007
In 25 years of personal computing, I have never once had RAM go bad on me. So when my Athlon box started to reboot randomly, I was initially at a loss to troubleshoot it. It was only after a few sobering minutes in memtest86 and switching sticks from slot to slot that I learned both of my KVR400X64C25/512 sticks were bad. No idea how they got that way; one was REALLY bad (half of it is trashed), and the other I probably could live with (only a few single-bit errors) but I filled out an RMA for both of them anyway. I don’t need my main desktop randomly flipping bits on me.
I learned two things from this experience:
Maybe I’ll finally get some console game-playing in.
Posted in Technology | Leave a Comment »
Posted by Trixter on March 26, 2007
This weekend was spent obsessing over the fastest text editor I could find for a 4.77MHz 8088 that had a functional undo. The results were a bit too lengthy for a blog post, so you can view the article I posted regarding the subject.
Nerd Alert: If you’ll never type on an XT for more than 10 minutes at a time for the rest of your life, don’t bother reading the article. There are much better things to do with your time :-)
Posted in Technology, Vintage Computing | Leave a Comment »
Posted by Trixter on March 18, 2007
(This post is a week late, but posts are usually better late than never.) I went to GDC the first week of March, and although I was incredibly sick the entire time and missed 90% of the conference, I did manage the following highlights which made it all worthwhile:
Sick, sick, and more sick, had three fevers, just now this week getting over it. Because of fever I was in the hotel room half the time, only saw Miyamoto at the awards and missed his keynote. I also had to leave Friday afternoon and missed the demoscene party that Pyro throws every year after the event… Still, I’ll never forget it and am glad I went.
Posted in Demoscene, Gaming | 5 Comments »
Posted by Trixter on March 18, 2007
In my last post, I stated that interrupts were supposed to be disabled on an 8088 for a MOV to the stack segment register (SS). Turns out that interrupts are supposed to be disabled during ALL segment register moves, not just SS! That explains why the procedure works to test if you have a buggy CPU or not:
Start DEBUG and run the following commands:
-A 100
MOV ES, AX
INC AX
NOP
-T
All registers are displayed at this point, where you want to look at the value in the AX register. If it is “0000” your 8088 CPU has the bug. AX = “0001” means your CPU passes the test & does not have the bug.
Why does this work? The T(race) command tries to single-step the MOV ES,AX instruction, but on a working cpu, the trace will include the INC AX as well, before the cpu stops so that you can check the result (value in AX). You can just as easily check the IP value, i.e. the position of the next opcode to be executed: If this is INC AX then you have a buggy cpu.
Many thanks to the venerable Terje Mathisen and DJ Delorie for cluing me in.
Posted in Programming | 1 Comment »
Posted by Trixter on March 17, 2007
That was the IM I got from a “friend” who shall remain “nameless” who was “unhappy” with the state of my “blog”. Fine, so I’ll post something, but for the record I have had excuses for not posting the last four weeks:
etc. etc. My life is actually quite privileged, and it sounds utterly ridiculous to complain, but I am human, which means I’m damaged, and this stuff affects me. I know it’s irrational. I’m sorry.
So, until I can lose some weight or report on some other stuff that is actually interesting to someone, I’m going to Post Something Dammit. Today’s PSD is on the topic of: 8088 CPU bugs. It’s time for some st00pid k0mp00ter history! Yes, the 8088 had bugs in the first iterations. Forget the Pentium FDIV bug; they’ve all had issues from day one :-) Two of the bugs were caught by Intel in 1982-ish, but not until 200,000 IBM PCs were sold. The third was fixed in the 80186.
The first two bugs involved interrupts and the stack. The first bug was that a MOV to SS (the stack segment) did not disable interrupts for the next instruction, meaning that you could get an interrupt in the middle. This is bad, because the interrupt will try to set up it’s own stack (something you were trying to do with the MOV SS!) and the stack is unlikely to recover, taking the machine with it. The workaround was this:
CLI
MOV SS,DX
MOV SP,AX
STI
ie. disable interrupts before you do the switch, then re-enable them when done. Which sucks, but is a good practice that I would imagine most people were doing anyway because they didn’t know that MOV SS,reg was a special case that was supposed to disable interrupts. Hell, I didn’t even know that until I started researching the bug.
But not all was good in Intel land: If you didn’t know the state of the interrupt going in, then you were supposed to preserve it, like this:
PUSHF
POP BX
CLI
MOV SP,word ptr [my_stack]
MOV SS,word ptr [my_stack+2]
PUSH BX
POPF
…except there was a second bug in the original 8088 in the POPF opcode which meant that, even if the state was still CLI after the POPF, interrupts would still be enabled for a single cycle! Try tracking THAT bug down in your program! So the workaround, which is just st00pid, is to fake POPF using IRET. (BTW, the odds of this particular bug cropping up is somewhere in the neighborhood of 1 in 5 million, and only when you switch stacks, so it is such a longshot that I never bother in my own code.)
But wait, there’s more! There’s a third bug where, if you try to use a segment override on MOVS or LODS (ie. so you can attempt to use something other than DS as the source) and an interrupt fires off during, say, a REP MOVSW, it stores the wrong return address. This was fixed in the 80186… I think. Not sure. I’m not sure that behavior is even officially documented so I’ve never had the urge to try it.
Posted in Programming, Technology, Vintage Computing | 2 Comments »