Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More a test... But can we try an Upstream Fetch #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 23 additions & 28 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
{
"presets": [
"presets": [
[
"env",
{
"targets": {
"browsers": ["last 1 Chrome version"]
}
}
],
"stage-2",
"react"
],
"env": {
"legacy": {
"presets": [
[
"env",
{
"targets": {
"browsers": [
"last 1 Chrome version"
]
}
"env",
{
"targets": {
"browsers": [">1%", "last 2 versions"]
}
}
],
"stage-2",
"react"
],
"env": {
"legacy": {
"presets": [
[
"env",
{
"targets": {
"browsers": [
">1%",
"last 2 versions"
]
}
}
],
"stage-2",
"react"
]
}
]
}
}
}
}
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{ts,tsx}]
charset = utf-8
indent_style = space
indent_size = 2
58 changes: 58 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'airbnb-base',
'prettier',
],
env: {
browser: true,
jest: true,
node: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint/eslint-plugin'],
globals: {
process: true,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'array-element-newline': 0,
'func-names': 0,
'import/no-unresolved': 0,
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'import/prefer-default-export': 0,
'import/no-unresolved': 0,
'max-lines': ['error', { max: 400, skipComments: true }],
'no-alert': 0,
'no-bitwise': 0,
'no-nested-ternary': 0,
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-console': 0,
'no-restricted-syntax': 0,
'no-restricted-globals': 0,
'no-plusplus': 0,
'no-use-before-define': 0,
'prefer-destructuring': 0,
quotes: ['error', 'single'],
},
};
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: true,
singleQuote: true,
};
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
node_js:
- 'stable'
script:
- yarn test-travis
- yarn test
before_script:
- npm prune
install:
Expand All @@ -18,7 +18,6 @@ notifications:
branches:
except:
- /^v\d+\.\d+\.\d+$/

deploy:
provider: pages
skip-cleanup: true
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,22 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

The Z80 cpu emulation (z80.ts) is derived from the work of Matthew Howell:

## Emulator for the Zilog Z80 microprocessor

This module is a simple, straightforward instruction interpreter.
There is no fancy dynamic recompilation or cycle-accurate emulation.
The author believes that this should be sufficient for any emulator that
would be feasible to write in JavaScript anyway.

The code and the comments in this file assume that the reader is familiar
with the Z80 architecture. If you're not, here are some references I use:
http://clrhome.org/table/ - Z80 instruction set tables
http://www.zilog.com/docs/z80/um0080.pdf - The official manual
http://www.myquest.nl/z80undocumented/z80-documented-v0.91.pdf
- The Undocumented Z80, Documented

(c) 2013 Matthew Howell
This code is released under the MIT license,
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
## A TEC-1 emulation in JavaScript
[![Build Status](https://travis-ci.org/tec1group/wicked-tec1.svg?branch=master)](https://travis-ci.org/tec1group/wicked-tec1)

In the summer of 1983, Ken Stone and myself designed the TEC-1, a rudimentary Z80-based computer
designed to teach people about microprocessors and programming in general. Ken and I built the prototypes,
programmed the ROMs and prepared the kit for publication in a small Australian electronics magazine.

35 years later, interest in this kit has remained strong and I recently decided to
revisit this old design and think about ways that it might still be relevant.
# Wicked TEC-1
## A TEC-1 emulation in JavaScript

There have been a couple of emulations of the TEC-1 over the years. I wondered whether
a good enough one could be written in JavaScript and run directly in a browser. It turns out
that, yes, you most certainly can. You can see the result of my experimentation, a live working version of the TEC-1 [running right here](https://jhlagado.github.io/wicked-tec1)
that, yes, it most certainly can. You can see the result of my experimentation, a live working version of the TEC-1 [running right here](https://tec1group.github.io/wicked-tec1/index.html)

### Update

This is a complete rewrite of the the Wicked Emulator. It's now written in React.

### Resources
- [An annotated disassembly of the TEC-1 ROMS](https://github.com/jhlagado/TEC-1)

- [An annotated disassembly of the TEC-1 ROMS](https://github.com/tec1group/software-repo/tree/master/monitors)
- [Introducing the TEC-1 early 1983](http://www.talkingelectronics.com/TE-1-15_pdfs/TE-Issue10.pdf)

### Things left ToDo
### Running Wicked TEC-1 locally

- Install nodeJS from https://nodejs.org/en/download/
- run
```
npm install
```
- run
```
npm start
```
- Navigate your browser to http://localhost:1334


[![Build Status](https://travis-ci.org/jhlagado/wicked-tec1.svg?branch=master)](https://travis-ci.org/jhlagado/wicked-tec1)
Binary file added assets/TEC-1x.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
24 changes: 24 additions & 0 deletions custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
declare module '*.svg' {
const content: any
export default content
}

declare module '*.png' {
const content: any
export default content
}

declare module '*.jpg' {
const content: any
export default content
}

declare module '*.json' {
const content: any
export default content
}

declare module 'nrf-intel-hex' {
const content: any
export default content
}
1 change: 1 addition & 0 deletions empty.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = '';
34 changes: 34 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '^.*.test.(ts|tsx)$',
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/icons/**/*.{ts,tsx}',
'!**/node_modules/**',
'!**/coverage/**',
'!src/index.tsx',
'!src/types/**',
'!**/tests/**',
],
setupFiles: ['<rootDir>/testSetup.js'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/empty.js',
'\\.(css|less)$': '<rootDir>/empty.js',
'\\.md$': '<rootDir>/empty-md.js',
},
testURL: 'https://localhost/',
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
},
},
};
Loading