unbibium: (animated pacman)
I think I started writing the BASIC port just so it could run this program.  Now it can.

10 PRINT CHR$(205.5+RND(1));:GOTO 10

In more frustrating news, the comparison operators are having trouble remembering the data type on the left side of the equals sign.  The original program used the carry bit, so now I need to figure out where exactly it pulled and stashed it.
unbibium: (Default)
So, in order for me to claim that I got the startup screen working, I have to get the CPU to walk through all the same subroutines that it did on the real Commodore 64, to bring up "38911 BASIC BYTES FREE".

Now, I can write a native subroutine that'll take a 16-bit byte and write the decimal equivalent to the screen, but the real Commodore 64 converts the number to a float, and calls the routine to print a floating point number. Since I'll have to get this thing to print numbers eventually, I might as well do it now. It'll be easier to do it before the point where I'm typing in test programs.

So, what I've been doing is setting parallel breakpoints on a Commodore 64 emulator and DTDB, and checking that the CPU and memory are at similar states at various points.

So far, I've gotten the right behavior up to the point where it calls FOUT. On a real Commodore 64, it hits MUL10 at least once, and I need to figure out why.

By the way, the Atari 8-bit version would have been much harder, because its OS stores its digits in BCD format, and the target CPU has no BCD math mode. The Commodore OS uses binary for everything, hence all the multiplying and dividing by 10.
unbibium: (animated pacman)

import math

def cbm2float(e, m):
    if m==0:
        return 0
    m2 = (1 + ((m & 0x7FFFFFFF) / 0x80000000))
    e2 = (2 ** (e-129))
    print (m2, e2)
    if m & 0x80000000:
        return -(m2 * e2)
    else:
        return m2 * e2

def float2cbm(f):
    if f == 0: return (0, 0)
    e = int(math.log(f, 2))
    e2 = e + 129
    m2 = int(((f / (2 ** e))-1)  * 0x80000000) 
    if f < 0:
        return (e2, m2 + 0x80000000)
    else:
        return (e2, m2)

print(cbm2float(0x84, 0x20000000))
print("%x %x" % float2cbm(10))

print("PI in the C64 rom is at AEA8: $82,$49,$0F,$DA,$A1")
print("PI found by this program is: %x %x" % float2cbm(math.pi))
unbibium: (Default)
I want to mod my Atari 800XL with the super-video mod, and then maybe put Ape Warp+ OS in it.

but I would hate to spend all that money on equipment and parts, and discover that I'm too blind to do it, and break my Atari in the process.

also, nobody else cares about those old games.
unbibium: (Default)
I watched a Cracked video discussion of Teenage Mutant Ninja Turtles, and realized something about its internationalization.

In the UK they were called "Teenage Mutant Hero Turtles" because "Ninja" was a violent and subversive concept. However, they didn't bother to change "turtle", which in the UK refers only to sea turtles, to "tortoise".
unbibium: (Default)
I'm reading iWoz, in audiobook form.

I'm glad it's unabridged. Even though I'm not a hardware guy, I'm fascinated by all the technical details about the stuff Woz built.

Also, the longevity of the Apple 2 was already impressive, as I'd seen them installed in my high school as late as 1996. But then I learned that the design was completed before Woz even left Hewlett-Packard.

It woke me up a little. The dawn of home computing was exciting enough for me when I was a little kid. But to people who were grown up at the time, it must have been even more magical. Could you imagine being the first person in your city to buy Visicalc?
unbibium: (Default)
We may have an heir to the Super Mario Frustration throne.

マリオっぽい自作ゲームを先輩にやらせてみた1

unbibium: (Default)
This demo played in stores in 1982.

unbibium: (Default)
I was unpacking a box in the closet, and in a late 1990s paperback edition of "The Restaurant at the End of the Universe", I found as a bookmark, the first concert ticket I'd ever purchased. I bought it at Dillard's, and got it for $20 with my KUPD Red Card.



It was for Ozzy Osbourne, and it was actually postponed at the last minute because Ozzy had gotten ill, so my best friend Donnie and I had to wait in the parking lot for his gigantic Ford Galaxie to cool down. He wore a T-shirt from the "Filthy Smelly Puking Habit" anti-smoking campaign of the time, which he proudly described to other concert-goers while smoking. I ended up getting a cheap (though possibly bootleg) T-shirt in the parking lot, and we met up with some other pissed off concert-goers while we waited for Donnie's car to cool down. Some of them had driven in from Tucson. But since I hadn't, I had fun anyway. It's also the first time I peed outside within the Phoenix city limits.

And a few months later, we got our concert, though the opening act had changed. It was just Sepultura then, which I didn't really care for.

The reason for the poor condition of the ticket could be the ravages of time, but it could also be because I dropped it in a puddle of beer. I actually left it at my seat while I went out to get refreshments, and had to sneak past a security gate as a result.

And just as Ozzy was about to come on stage, the lights to the seats went out, and I still hadn't found my seat yet, and as a result I crashed into some guy and made him drop his beer. He got angry enough to raise the attention of security, but before he got there, I'd diffused the situation by covering the cost of the beer, with a $20 bill. I didn't care about making change, I just wanted to not get in a fight, not get kicked out, and not miss the beginning of the show.

I don't really remember much else about the concert, except it being my first concert I didn't really know how to emote properly.

Funny, now that I'm working for Ticketmaster, I don't see many concerts anymore.
unbibium: (Default)
Know the AppleTV? Well, Commodore makes one too.

But I think it's only available in Europe.

Profile

unbibium: (Default)
unbibium

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 24th, 2017 10:49 pm
Powered by Dreamwidth Studios