Enjoying my day off ... #PAL2 #mos6502 #via #fischertechnik
The computer that outcomputers them all!
#retrocomputing #mos6502
Behold, the magical #DeiMOS 🧙‍♂️, a #superoptimizer that masquerades as the messiah of MOS 6502 #code #efficiency. In reality, it's a lethargic snail 🐌, spending eons to find the "optimal" sequence that no one has the patience for. Why wait for DeiMOS when you can just let your code run until the universe ends? 🚀✨
https://aransentin.github.io/deimos/ #MOS6502 #sluggish #performance #coding #humor #HackerNews #ngated
DeiMOS

DeiMOS

Been busy last few days looking at the Mercenary #c64 source. Pretty fascinating, there's a lot of logic and 3D maths in a small space. Lots data compaction techniques ... but then it uses 2K for a custom font with 2 typefaces w/ inverted glyphs?

A couple of days ago I wrote a disassembler for the game engine bytecode. It runs a chunk of the game but a lot of business logic is in the 6502.

Writing #MOS6502 was how I learned to code, such a cute little cpu, fond memories of simpler times.

What's not in my profile?

I used to be a huge Wirth-ian in the 1990s and spewed excellent tirades against the evils of C. Niklaus Wirth is also my "PhD grandfather" via Michael Franz at #UCIrvine.

I prefer lecturing sitting down in front of a laptop and talking while I do stuff on said laptop. I very much dislike slides and prefer chalk and blackboard for things like data structures.

I got my "15 minutes of fame" served unexpectedly:

https://www.insidehighered.com/news/2013/02/12/students-boycott-final-challenge-professors-grading-policy-and-get
https://boingboing.net/2013/02/19/students-get-class-wide-as-by.html
https://archive.nytimes.com/economix.blogs.nytimes.com/2013/02/14/gaming-the-system/

But it still was fun.

I got my undergraduate degree from https://www.cs.hm.edu/ which back then was not allowed to feed into PhD programs. It's a thing in Germany: Everything is tiered and changing the tiers requires a change to the constitution of the republic (I am joking, but not really) so it takes a while. (Nowadays it would be easier to go on to a PhD from there.) The "plus" was that I spent two semesters in industry. In one I quickly out-FORTRAN-ed my boss, in the other I learned C++ from Stroustrup in two weeks while riding the bus. Beat that Ivy League!

I grew up on #c64 #basic and #mos6502 (well, #mos6510 I guess) assembly, went on to #m68k assembly, #gfabasic and lots of #oberon. Of course I was dabbling in #modula2, #prolog, #scheme, and more. Then it was mostly whatever I needed so #fortran, #cpp, #java, lots of #python, lots more #c, lots more #arm and #x86 assembly, some #golang, some #ocaml, some #csharp even if you can believe it. Nowadays it's pretty much #c all day with chunks of #python and bits of #rust now and then. And chunks of #bash too.

(Proudly self-plagiarized off of a few 2023/2024 posts from my previous account.) #introduction #SorryItsLate

Students boycott final to challenge professor's grading policy (and get As)

To test limits of Johns Hopkins professor's scaled grading policy, all of his students boycott the final -- and all get As as a result.

Inside Higher Ed | Higher Education News, Events and Jobs

Some people claim thar the 6502 is a RISC processor. It's not.

Hill I'll die on: The 6502 is about as unRISCy as a 4500 transistor 8-bit CPU can possibly be. It has over a dozen addressing modes, and is not orthogonal at all.

That says nothing about whether the 6502 is good or bad. In my opinion it was/is quite good for a lot of things, but not necessarily best for everything. It was, however, absolutely brilliant for the time it was introduced (late 1975).

#mos6502

Emulador de Commodore PET 2001 con Lilygo TTgo VGA32

En este artículo vamos a emular el primer ordenador personal de Commodore sobre una TTgo VGA32 de Lilygo.

Sobre Commodore PET 2001

En 1977, Commodore decide entrar en el incipiente negocio de los ordenadores domésticos mediante el PET, acrónimo de Transactor Electrónico Personal. Sería el inicio de una saga que marcó un hito en la historia de la informática.

En particular, los primeros PET 2001 constaban de teclado de goma, bastante pequeño e incómodo, pantalla monocroma de 9″ y lector integrado de cassette. Poco después, Commodore actualizaría el PET con la serie 2001-N con teclado mejorado, pantalla de 12″ y sin cassette integrado. De esta familia derivaría la CBM 4000.

A nivel de arquitectura, los PET 2001 constabas de una CPU MOS 6502 a 1 MHz, un mínimo de 4 KB de RAM y chips MOS 6520 PIA para gestión de periféricos y MOS 6522 VIA para otras funciones.

Emulador

Utilizaremos como base el emulador PET de jscrane sobre esta misma plataforma.

Cambios en nuestro emulador

Se realiza importantes cambios en el código original incluyendo:

  • Se añade soporte para VGA3Bit de bitluni (ESP32Lib).
  • Se añade soporte para ROM serie 1.
  • Incluye sistema de reconfiguración dinámica ROM/RAM en caliente, que permite cambiar entre distintas versiones de máquinas de esta familia.
  • Se contempla una nueva política de gestión de temporizadores y señales.
  • Se deshabilita el uso de SD.

Entorno e instalación del emulador

Elementos

Vamos a necesitar los siguientes elementos:

  • Placa Lilygo TTgo VGA32 v1.4.
  • Monitor con entrada VGA.
  • Teclado con conector PS/2 o, en su defecto, convertidor USB a teclado PS/2.

Instalación

Nos basta con descargar el código fuente de GitHub.

$ git clone https://github.com/RafaGS/PET.git

Construimos los binarios y los subimos a la placa.

Emulación

Una vez realizada la subida, desconectamos la TTgo del PC y la conectamos a un monitor y teclado.

Al encender el dispositivo, nos aparecerá la pantalla clásica del PET original de 4KB de RAM con la versión de BASIC 1.0, identificable por los asteriscos rodeando la frase «COMMODORE BASIC».

Probaremos a ejecutar algún comando BASIC.

Podemos emular también la versión con 8 KB de RAM. Para ello, pulsaremos la combinación [Super][F2].

Con la combinación [Super][F3] accederemos a la versión 2001-N, que actualiza al BASIC 2.0, cuya pantalla inicial se diferencia por las almohadillas que rodean al mensaje de «COMMODORE BASIC».

Con [Super][F4] tendremos la versión de 16 KB.

Y, finalmente, con [Super][F5] podremos trabajar con 32 KB.

Podremos regresar a la versión original con [Super][F1].

#1977 #Commodore #LilygoTTgoVGA32 #MOS6502 #MOS6520PIA #MOS6522VIA

Emulador de Commodore CBM 4032 con HamGeek MiSTer

En este artículo vamos a emular el sucesor de la familia PET de Commodore sobre un sistema MiSTer de HamGeek.

Sobre Commodore CBM 4032

En 1980, Commodore decide actualizar su serie PET con un nuevo diseño mejorado, sobre todo en pantalla y teclado, cambiando de camino la denominación PET a CBM por cuestiones de copyright, al estar la marca «PET» previamente registrada por Philips.

Su arquitectura se basa en un procesador MOS 6502 a 1 MHz. Asimismo, implementa dos MOS 6520 PIA para la gestión de periféricos, un MOS 6522 VIA para gestión de otros interfaces y un MOS 6545 CRTC para la gestión del monitor. Venía con 32 KB de RAM y 2 KB de vídeo.

Entorno e instalación del emulador

Elementos

Vamos a necesitar los siguientes elementos:

  • HamGeek MiSTer.
  • Monitor con entrada HDMI.
  • Teclado USB.

Instalación

Este emulador viene incluido en el core PET2001, que seleccionaremos dentro del menú Computer.

Bastará con seleccionar el core.

Emulación

Una vez realizados los pasos anteriores, dispondremos de la pantalla de inicio del CBM 4032.

Podemos escribir nuestros códigos en su BASIC.

#1980 #Commodore #HamGeekMiSTer #MOS6502 #MOS6520PIA #MOS6522VIA #MOS6545CRTC