Giter VIP home page Giter VIP logo

applepy's Introduction

applepy

Apple ][ emulator written in pure Python and Tkinter.

It runs slow as molasses with normal CPython, so use PyPy3 for similar speed of a real Apple!

sudo apt install pypy3 pypy3-tk
cd applepy
pypy3 a2.py

The emulator does not implement clock-cycles so it is always running at fullspeed. Text screen uses 'curses' and graphics screen uses 'tkinter' and are rendered on separate windows.

Example Session

Start the emulator with:

python3 a2.py

The emulator will boot but will not do anything without a disk inserted. Enter CLI (command line interface) mode with the '~' key and load a binary file at memory location $2000 (Hi-Res page 1) followed by a video refresh:

bload bin/wc.pic $2000
hgr1

Let's go back to the emulator with the 'c' command (for 'continue') and stop the booting process with the reset button '|'. It will give us Applesoft BASIC. Let's write a short program and run it:

10 PRINT "HELLO WORLD! ";
20 GOTO 10
RUN

Stop the execution with CTRL-C. Enter CLI mode and press 'q' to quit the emulator.

Windows

Requires curses package. You can use curses cross-platform (Windows, MacOS, GNU/Linux) if you install manually for Windows or like other package in others.

Install wheel package. For more info about wheel: http://pythonwheels.com/

Go to this repository: http://www.lfd.uci.edu/~gohlke/pythonlibs/

Download a package with your python version, in example for python 3.8:

curses‑2.2.1+utf8‑cp38‑cp38‑win_amd64.whl

Install it (this command if for windows, in GNU/Linux install like other package)

python -m pip install curses‑2.2.1+utf8‑cp38‑cp38‑win_amd64.whl

Just include in your python script:

import curses

You can also try this command:

pip install windows-curses

Enjoy!

applepy's People

Contributors

ekbann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.