On-chain generative art for the Commodore 64 home computer.
ORAAND is a series of collectable (via the ERC 721 NFT standard) generative art programs which are executable on Commodore 64 computers and emulators (such as VICE). Each 2048 byte program (PRG) is generated on the Ethereum blockchain and can be downloaded from this website or the ORAAND Contract by calling the 'getTokenPRGBase64' function. The PRGs will be available for as long as the Ethereum blockchain exists. The composition of each of the PRGs is determined at time of minting.
When viewed on marketplaces such as OpenSea, each program will be displayed using an emulator which is stored on the Ethereum blockchain.
Minted ... out of 1024
ORAAND PRGs are generated on the Ethereum network. You need to be connected to the network to be able to download PRGS
Downloading PRGS is a free gasless transaction
You can also download Base64 encoded ORAAND PRGs by calling the getTokenPRGBase64 function directly from the ORAAND Contract on Etherscan. You do not need to be connected to the Ethereum network (or have a wallet/account) to call this function on the Etherscan website. See the About page for a description of the function's parameters.
ORAAND PRGs are generated on the Ethereum network. Downloading a PRG is a free gasless transaction.
You can also download Base64 encoded ORAAND PRGs by calling the getTokenPRGBase64 function directly from the ORAAND Contract See the About page for a description of the function's parameters.
The Commodore 64 home computer was released for sale in August of 1982 and its production ceased in 1994. It has long held the Guinness World Record for the best selling single model of desktop computer. Over the course of its production run, the specifications of the machine remained largely the same: an approximately 1Mhz 6510 8-bit CPU, a fixed 16 color palette, 3 voice sound, 64 KB RAM. The Commodore 64 machines released in 1982 were just as capable of running the same software as the machines released 12 years later in 1994. Though the hardware specification remained static, the quality of the software improved greatly over time and continued to improve even after production of the machine had ceased. Tools and techniques were developed and refined, and new discoveries were made about the capabilities of the hardware. The hardware specification was fixed in 1982, but the concepts of time, ideas and innovation changed what the machine would do.
ORAAND - Onchain Generative Art Programs for the Commodore 64
The code for each ORAAND is a 2048 byte program (PRG) which can be run on Commodore 64 hardware or Commodore 64 emulators such as this website or the x64sc emulator included with VICE. An onchain emulator is used to display the PRGS on marketplaces such as OpenSea. When running, the PRG will produce generative audio with visuals. Each ORAAND PRG is generated on the Ethereum blockchain and has unlockable modes. More modes become available to unlock the longer the token is held for.
View the catalog of ORAAND PRGs minted so far.
The PRG Format
A Commodore 64 PRG is a binary file where the first 2 bytes specify a 16 bit address and the remainder of the file contains the binary data to load into memory at that address. The following image shows the complete 2048 bytes in hexadecimal format for the PRG for ORAAND 0. The first two bytes '01' and '08' indicate the PRG is to be loaded into memory at hexadecimal address '0x0801'.
The following image shows the location of the PRG as a white block within the Commodore 64's 64KB of RAM (addresses 0x0000 - 0xffff)
Standard Character Screen Mode
ORAAND PRGs use the Commodore 64's 'Standard Character Screen Mode' where the screen is divided into a 40x25 grid of 8x8 pixel cells. This mode has a resolution of 320x200 (plus the border). In Standard Character Mode, each 8x8 pixel cell can display one of 256 custom defined characters. Each cell can have its own foreground color and the background color is shared between all cells. The colors are set to one of colors from the Commodore 64's predefined 16 color palette. ORAAND PRGs use 43 custom defined characters, the foreground color is the same for all cells. The following image shows the 43 custom defined characters used for ORAAND 0.
ORAAND PRGs were written in 6510 assembly language. In 6510 assembly language, each line is an instruction telling the Commodore 64's 6510 processor what to do. The instruction may also have an operand which can specify a byte value or a memory address for the processor to operate on. For example, 'LDA $1000' will tell the processor to load the byte stored at address 0x1000 in memory into the processor's accumulator register. 'ORA #$01' will tell the processor to perform a logical 'OR' operation between the byte in the accumulator register and the byte value 0x01 and store the result back in the accumulator. 'STA $1000' will tell the processor to store the byte that is currently in the accumulator register at the address 0x1000. Assembly language programs are converted into a sequence of bytes by an assembler. The ORAAND solidity contract combines these sequences of bytes to return the PRG for each token.
Display of ORAAND PRGs on this Website
This website contains an emulator which will display the output of the PRG for the ORAAND currently being viewed together with the waveforms for each of the voices of the sound chip, the character set used to generate the graphics, the disassembly of the code being executed and the contents of memory where the shape being displayed is defined. A copy of this emulator without the Kernal, Character or BASIC ROMs is on the Ethereum blockchain and is used to display each token on platforms such as OpenSea which use the tokenURI method of the ERC 721 standard to display tokens.
After an ORAAND is minted, the webserver will download a copy of the new token's PRG from the ORAAND contract. This is the PRG which is displayed if someone visits this website without connecting a wallet. If someone visits this website with the MetaMask wallet extension installed, a token's page will obtain the PRG directly from the contract. No gas fees are involved.
On Chain Emulation
When viewed on websites such as OpenSea, each ORAAND will be displayed via an on chain emulator, Minimal 64. Minimal 64 is a small emulator capable of running Commodore 64 programs which do not use the Kernal, BASIC or Character ROMs. It contains its own custom Kernal ROM which can be used to start programs. The intention of Minimal 64 is that if a program runs on it, that program should also be able to be run on a real Commodore 64.
Marketplaces such as OpenSea will call a contract's tokenURI method to obtain metadata about a token. The tokenURI method can return a URL where the metadata can be found, or as in the case of ORAAND, returns the metadata directly. Each ORAAND token's metadata includes an 'animation_url' attribute. The value for this attribute is a complete HTML page containing the token's PRG data and the emulator to display the prg within the HTML page.
At present, the static images displayed for each token are generated off-chain and stored on this server. Once all the tokens are minted, a storage solution such as IPFS will be looked at for the static images.
The contract used to create the output for an ORAAND token's metadata is here
Each ORAAND has modes which may be unlocked over time by its owner. To unlock a mode, the token must be held by a wallet for a certain amount of time. If the token is sold or transferred, the time counter will reset. Unlocking modes is free, but will use a small amount of gas for the transaction.
Once a mode is unlocked, the spacebar can be used on this website to switch between modes. If the PRG is downloaded after unlocking modes, the button on a joystick in port 2 can be used to switch modes.
If you own a token and have unlocked multiple modes, a section will appear at the bottom of the token's page which will allow you to set default mode the token will displayed in. Again, this is free, but will require a small amount of gas for the transaction.
When viewing an ORAAND, you can use the left/right cursor keys on a keyboard to rotate the ORAAND. The up/down cursor keys can be used to show/hide layers. If running on real hardware, a joystick in port 2 can be used.
Downloading ORAAND PRGs
Each ORAAND PRG is generated by Solidity code running on the Ethereum blockchain and can be returned in the form of a Base64 encoded string by executing the function getTokenPRGBase64. Decoding the Base64 string will produce the binary PRG which can then be run on Commodore 64 computers. Running this function from the Etherscan website does not require you to have an Ethereum account/wallet.
getTokenPRGBase64 accepts parameters which will determine if the PAL or NTSC version of the PRG is returned as well as settings the returned PRG should use to control the Commodore 64's audio filter.
|tokenId||uint256||The id of the token to obtain the PRG for|
Which model the PRG should be for
'true' for the PAL version, 'false' for the NTSC version
Most emulators use PAL by default
This parameter will determine the resonance of the audio filter (0-15)
in the Commodore 64
and which voices (1-3) will pass through the filter.
Pass a value of 0 to use the default values, otherwise this should be a byte value in the format the SID regsiter $d417 expects:
bit 0: set to 1 to filter voice 1
bit 1: set to 1 to filter voice 2
bit 2: set to 1 to filter voice 3
bit 3: set to 1 to filter external voice (not used)
bits 4-7: filter resonance (0-15)
This parameter will determine the output volume (0-15)
and the type of filtering the audio filter in the Commodore 64 should use
Pass a value of 0 to use the default values, otherwise this should be a byte value in the format the SID regsiter $d418 expects:
bits 0-3: volume (0-15)
bit 4: set to 1 to enable the low pass filter
bit 5: set to 1 to enable the band pass filter
bit 6: set to 1 to enable the high pass filter
bit 7: set to 1 to disable voice 3
Commodore 64 Specifications
|Release Date||August 1982|
|CPU||MOS Technology 6510/8500 running at 1.023 MHz for NTSC models and 0.985 MHz for PAL Models|
|Memory||64 KB RAM + 20 KB ROM|
|Graphics||MOS Technology VIC-II
Max 320×200 resolution, 16 fixed colors, the number of colors onscreen and the resolution will depend on the screen mode. Modes can be mixed.
|Sound||MOS Technology SID 6581/8580
3 Oscillators with ADSR, each capable of producing 4 different waveforms: Triangle, Sawtooth, Pulse, Noise
One filter shared between the oscillators
Some notes on Home Computers
In 1995 Bill Gates appeared on the Late Show with David Letterman to explain the Internet. Before saying it's easy to criticise something you don't understand and joking about how radios and tape recorders had already solved the problem of listening to baseball games on demand, host David Letterman asked Bill Gates "Why don't I have a computer?". Bill Gates answer was they still needed to find an application for him. The Commodore 64 was released 13 years before this interview.
The Challenge of Selling the Concept of a Home Computer
Before the Commodore 64 was released in 1982, the idea of home computers intended for non-technical users had already been introduced in 1977 by the Apple II, Commodore PET and TRS-80 computers. The companies producing these early computers had the challenge of convincing people they needed a device in their home that they had never needed before. Many of the suggestions in advertisements seemed to relate to education, home finance and organizing cooking recipes. By 1982 home video games had already gained popularity. The first video game console, the Magnavox Odyssey, was released in 1972. The Atari 2600 was released in September of 1977 and sold in large quantities after the release of the Atari 2600 conversion of Space Invaders in 1980.
The success of home computers in the late 70s and early 80s lead to many electronic companies releasing their own home computers. Some companies had no prior connection to the computer industry. Not much thought was given to compatibility between manufacturers. Many of the computers were unsuccessful. Commodore released the Commodore VIC-20 in 1980/81 and it was the embodiment of the philosophy 'computers for the masses not the classes'. It was intended to be more affordable than previous computers and became the first computer of any type to sell a million units.
Experience and Refinement
When the Commodore 64 was released in 1982, the experience and ingenuity of Commodore's engineers allowed it to produce a computer which was superior to other computers in its price range in terms of graphics and sound. Commodore owned its own semiconductor fabrication facilities, MOS Technology, which allowed it to reduce costs and aggressively price the computers. The Commodore 64 brought home computing to a large number of people.
Unfulfilled Promise and Downturn
As more home computers entered the market in the 80s it became apparent that many of the promises of this emerging technology hadn't come into fruition. Hardly anyone was using their computer for home finances or managing cooking recipes. The most common use was for playing video games, or the computer had been put away into a cupboard. One 1985 study of several thousand US households found that during a typical week, 40% of all adult computer owners did not use their computer at all. In 1984 the designer of the TRS-80 Model I, Steve Leininger, stated the industry hadn't found a compelling reason to buy a computer for the home besides Word processing. The founder of Compute!, a popular home computing magazine, stated in 1986 "our market dropped from 300 percent growth per year to 20 percent" when writing about the demise of two of Compute!'s magazine competitors. With the downturn and the aggressive pricing of Commodore, many of the companies which had sprung up to catch the home computing boom went bankrupt or ceased their production of computers.
Building out of a Downturn
The power of computers has increased significantly since the introduction of the Commodore 64. Computers are no longer limited to the same 16 fixed colors or the 3 voice sound the Commodore 64 possessed. Moore's law, an observation that the number of transistors on an integrated circuit doubles around every two years, has mostly held true since the 70s.
The popularity of the internet since the 90s has made owning a computer to be more desirable to people who may never have considered owning a computer before. Many people now reaching adulthood have never known life without computers or the internet. Innovations and ideas which rely on computers have taken place and been adopted to the point they have become part of everyday life for a large number of people. The moment when companies had to convince people of the need for computers seems long gone.
Time, Progress and Obsolescence
With progress comes obsolescence. Recent technological obsolescence can make some some types of media disappear or at least become difficult to experience again. Operating Commodore 64s still exist in the world and are available on second hand markets. Commodore 64 emulators for modern operating systems are still actively developed and maintained. Time will most likely lead to more progress in the field of computing, but the base 1982 specification of the Commodore 64 will remain unchanged.
A token's parameters will be set at the time of minting.
After minting, the webserver will call the contract's 'getTokenPRGBase64' function with the new token's id and use the returned PRG to generate the token's Image. Your web browser will be redirected to the page for the token where the token's PRG will be obtained from the Ethereum blockchain.