Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_meta_box_present is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_send_notification is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_modify_title_and_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_heading is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$response_body is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Sorpresa, Visual Studio Code permette di programmare il Commodore 64

Sorpresa, Visual Studio Code permette di programmare il Commodore 64

Il Commodore 64 è ancora oggi amato dai nostalgici e dagli appassionati di retrocomputing. Grazie all'estensione VS64 per Visual Studio Code, è possibile sviluppare software per il C64 in BASIC, Assembly 6502 e C, su tutte le piattaforme.

Il Commodore 64, lanciato nei primi anni ’80, è stato uno dei computer più venduti della storia, con oltre 10 milioni di unità commercializzate entro il 1986. Quello storico sistema desta ancora oggi curiosità e interesse: molti sviluppatori e appassionati che hanno vissuto l’epoca degli 8 bit desiderano rivivere quelle esperienze e trasmetterle alle nuove generazioni.

Uno dei punti di forza del Commodore 64 (C64) era la sua facilità d’uso. Con un’interfaccia intuitiva e la possibilità di programmare direttamente in BASIC, è rapidamente diventato un eccellente banco di prova per chi si avvicinava al mondo dello sviluppo software. La disponibilità di emulatori moderni ha reso il C64 accessibile a chiunque, consentendo a nuovi programmatori di esplorare il retrocomputing senza la necessità di hardware originale.

Visual Studio Code per programmare il Commodore 64 su tutte le piattaforme

Il successo sconfinato di Visual Studio Code, disponibile nelle versioni multipiattaforma per Windows, Linux e macOS, è giustificato anche dalla sua estrema versatilità e flessibilità. Il software Microsoft può infatti essere utilizzato anche per programmare il Commodore 64 grazie all’estensione VS64, il cui sorgente è condiviso pubblicamente su GitHub.

Creata da uno sviluppatore indipendente, VS64 aiuta a sviluppare per Commodore 64 in BASIC, Assembly 6502 e C mettendosi in evidenza per una serie di caratteristiche di primo piano:

  • Evidenziazione della sintassi.
  • Supporto per compilatori e assembler come ACME, KickAssembler, CC65 e LLVM-MOS.
  • Debugging integrato con l’emulatore VICE.
  • Ottimizzazioni e strumenti per il linguaggio BASIC, inclusi numerazione automatica delle linee e rimozione di spazi e commenti.

Per usare VS64 (ricordiamo che il numero 64 si riferiva ai 64 KB di memoria RAM disponibili sul Commodore 64), basta accedere al marketplace di Visual Studio Code, cercare VS64 quindi cliccare su Installa.

Durante la configurazione iniziale, basta seguire la procedura guidata specificando compilatori e assembler da usare. In alternativa, è possibile accedere alle impostazioni dell’estensione tramite l’icona dell’ingranaggio.

Visual Studio Code con emulatore Commodore 64

Debugging con l’emulatore VICE

L’estensione VS64 supporta direttamente l’emulatore VICE, disponibile anch’esso per tutte le varie piattaforme.

Con VICE è possibile verificare il comportamento del codice sviluppato ricreando in modo virtuale un sistema Commodore 64 identico all’originale.

Dopo aver salvato il file il corso di sviluppo, basta semplicemente cliccare su Run, Run and Debug o cliccare sull’icona del debug nella barra degli strumenti di sinistra per poi selezionare la freccia verde. In questo modo il programma per Commodore 64 andrà in esecuzione con VICE.

Differenze nello sviluppo di codice per Commodore 64 in BASIC, Assembly 6502 e C

Il Commodore 64 è una macchina iconica, amata da generazioni di programmatori e appassionati di retrocomputing. Grazie alla sua versatilità, offre diverse modalità di sviluppo software, che spaziano dal semplice BASIC, all’efficiente Assembly 6502, fino al linguaggio C.

BASIC è il primo linguaggio che molti programmatori hanno utilizzato. Nel caso del Commodore 64, è integrato direttamente nel sistema, quindi basta accendere il computer per iniziare a scrivere codice. La sintassi è semplice e diretta, inoltre non servono strumenti aggiuntivi.

Essendo un linguaggio interpretato, le prestazioni sono lente, soprattutto quando si tratta di gestire grafica ed effetti sonori. Non è inoltre possibile sfruttare appieno le potenzialità del processore MOS 6502 così come dei chip grafici e audio del C64.

Di contro, Assembly 6502 richiede una profonda conoscenza dell’architettura del C64 e delle sue limitazioni ma permette di produrre codice estremamente veloce e ottimizzato.

Il linguaggio C rappresenta un equilibrio tra la semplicità del BASIC e le prestazioni dell’Assembly. Grazie a compilatori come CC65 o LLVM-MOS, è possibile sviluppare codice in C per il Commodore 64, beneficiando di una sintassi più moderna e leggibile.

Effetto nostalgia assicurato

Utilizzare Visual Studio Code con l’estensione VS64 vi farà fare un viaggio all’indietro nel tempo di ben 40 anni. È un’emozione indescrivibile poter tornare a “sporcarsi le mani” sulla stessa macchina che ha portato milioni di persone in tutto il mondo ad avvicinarsi al mondo della programmazione.

La preservazione del software che ha segnato la storia dell’informatica è fondamentale. Ed è davvero una sorpresa che oggi sia possibile mettere le mani su un Commodore 64 servendosi di una soluzione moderna e continuamente aggiornata come Visual Studio Code.

Nonostante CBM PRG Studio sia il punto di riferimento per molti programmatori C64, la sua compatibilità nativa è limitata a Windows. L’accoppiata Visual Studio Code più VS64 permette di superare i confini del sistema operativo Microsoft, con la possibilità di lavorare anche su Linux e macOS.

Credit immagine in apertura: PrixeH, licenza CC BY-SA 3.0.

Ti consigliamo anche

Link copiato negli appunti