Coder Social home page Coder Social logo

timex.emu's Introduction

timex.emu's People

Contributors

pawlos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

timex.emu's Issues

Support running ZEXALL tests suite

Based on https://floooh.github.io/2016/07/12/z80-rust-ms1.html

  • the CPU emulator, attached to 64 KByte of empty, flat memory
  • a raw dump of the ZEXALL or ZEXDOC Z80 binary code which must be loaded at address 0x0100 into the emulated RAM (this is where CP/M programs usually are located)
  • set the CPU’s PC register (program counter, or instruction pointer) to the program start at 0x0100, and the stack pointer to 0xF000 (I have no idea where the stack pointer is in CP/M, it just has to be in an area that’s not overwritten while the test runs)
  • start executing instructions… this will properly update the CPU state, but we can’t see anything from the outside…
  • at some point, the code will call into CP/M operating system functions by jumping to address 0x0005, with a number in register C that identifies the requested function. Thankfully ZEX only calls 2 different functions, one is 0x02 which outputs a single character to the terminal, and the other is 0x09, which outputs a string (terminated by the character ‘$’, not a null byte)

So to emulate the required CP/M calls I need to:

  • after each instruction, check whether the PC register is 0x0005
  • if the C register is 2, output the value in register E as ASCII code to the console
  • if the C register is 9, start reading bytes at the address in register pair DE until ‘$’ and output them as ASCII to the console

Organize tests better

Split up tests into multiple files. Tests should be moved into python folder as they written are in python

Display

Currently there's no way to display anything if screen buffer is populated with data. There should be a way to display drawing on screen.

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.