Hacker News new | past | comments | ask | show | jobs | submit login
Apple II Basic Bot (atari8bitbot.com)
62 points by elvis70 on Jan 17, 2021 | hide | past | favorite | 18 comments



To get around Twitter's character limit, someone invented a way of encoding machine code into a BASIC listing.

https://twitter.com/deater78/status/1348143447333597185

    10 FOR I = 0 TO 143 : POKE 872+I,4 * PEEK(2125+I) - 192 + (PEEK(2269 + I/3) - 35) / 4^(I-INT(I/3)*3) : NEXT
    
    20 &",=n9D`M1X/5Z.Ni+Mi*AS'1kD.b3kR4jjk/3bbnLX0k0j_E`>0SP.X1P2(02ImRB28=mY8J0N9:W3T/JhO;X/OoI73)mZ[/3/1BQ]g/Q<63nWoR,gb1`<QC8:JoLE0#.1+01,/omnngmo7G0S+O6::>GP'#5C`'#4RNMD%6*00),NWD4PI*+-C/Ia*Z?6*@S


Anyone know what that decodes to?


there's a page that exaplains what's going on with a lot of these entries: http://deater.net/weave/vmwprod/appleiibot/


Oh man, I wish I had some of my old Apple ]]+ floppies! I spent weeks (an hour at a time) typing and porting the BASIC Star Trek game from one of the magazines into an Apple ][+ back in grade 5/6. Was quite the learning experience back in the 1980s. Being exposed to so much code was an excellent way to learn.


There's also

https://www.scullinsteel.com/apple2/

But it seems it doesn't work in Firefox. (EDIT: It does work, my mistake. This is really a cool and very complete piece of software and the only thing missing seems to be the manual :-)


Works for me in Firefox - at least when I selected a disk image. Might just be slower to boot.


You're right! I didn't expect it to need a disk, as in my memory the Apple ][ would just boot into AppleSoft Basic.


You had to press reset or ctrl-Reset to get to the Applesoft prompt.


I have never owned an Apple II; is it normal to end up with multiple blinking cursors when you press the RESET key multiple times?


Yes, on the early models.

Flashing text is a feature of the video hardware, and on early Apple II models the cursor is just a space character with the Flash bit enabled.

You can turn on flashing text with the FLASH command. E.g.:

    FLASH:?"HELLO WORLD"
Later models will produce the flashing cursor in software rather than hardware, so you can't inadvertently end up with multiple flashing cursors on screen.


That sounds like an emulator bug, almost certainly


It is actually early Apple video hardware displaying characters with the flash attribute set.


Interesting. Thanks. I need to refresh my Apple hardware knowledge


No worries. I am actually into the machines at the moment, so a lot of it is spooled up, reasonably fresh.

The blink implementation will work when video does. Pretty much independent of CPU state. That whole circuit works on phase 2 of the 6502 bus clock and is basically transparent to the CPU.

That kind of thing normally takes wait cycles, or multi port RAM.

Bonus points: Doubles as RAM refresh.

The only impact is a slightly longer cycle every 63 (I think) cycles to make the video line up with the clock to allow for the artifact color hack to work consistently.

To the CPU, there are no waits and it runs at full speed. In physical time, that long cycle takes a bit longer than the other ones which can complicate things like bit banging audio, if not done on a long cycle multiple.


I'm assuming this was a Woz invention and it continuously blows my mind at how practical he was.


Well, if it was not, he was one of the first.

Seriously practical.

Having come from that era, watching this play out was interesting.

The Apple was simple, very practical. Other more complicated and advanced machines had custom silicon. Sound, graphics.

But, they often lacked utility, and the outcome was Apples being workstations.

A whole lot of code and hardware dev for other systems got done on Apples, which offered enough of the basics to cover most bases.

80 columns, fast disks, slots, easy interfacing, no interrupts or DMA in base system, 6 color graphics not just 4, etc...

The set of tradeoffs is admirable.

I use mine today for retro code tinkering and some hardware fun. I have it running at 16Mhz, (which frankly is stupid fast) with the 16bit 65816 in it just for kicks. And that is robust. I can turn a knob and dial the clock up or down never missing a beat. Weird and fun.

Bonus: Grand kids can experience Oregon Trail.

I jumped onto one of these in the 80's and learned a ton!



there's also a demoscene demo that shows off some of these programs

https://www.pouet.net/prod.php?which=87462




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: