Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
chip-ahoyto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
João Magalhães
chip-ahoyto
Merge requests
!4
Support for WASM
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Support for WASM
joamag/wasm
into
master
Overview
0
Commits
10
Pipelines
1
Changes
8
Merged
João Magalhães
requested to merge
joamag/wasm
into
master
2 years ago
Overview
0
Commits
10
Pipelines
1
Changes
8
Expand
Description
Initial rudimentary support for WASM was added.
1
0
Merge request reports
Viewing commit
5ec145e0
Prev
Next
Show latest version
8 files
+
515
−
84
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
Verified
5ec145e0
feat: initial WASM version
· 5ec145e0
João Magalhães
authored
2 years ago
examples/web/chip_ahoyto.d.ts
0 → 100644
+
91
−
0
Options
/* tslint:disable */
/* eslint-disable */
/**
*/
export
class
Chip8Classic
{
free
():
void
;
/**
*/
constructor
();
}
/**
*/
export
class
Chip8Neo
{
free
():
void
;
/**
*/
constructor
();
/**
* @param {Uint8Array} rom
*/
load_rom_ws
(
rom
:
Uint8Array
):
void
;
/**
*/
reset_ws
():
void
;
/**
*/
reset_hard_ws
():
void
;
/**
* @returns {Uint8Array}
*/
vram_ws
():
Uint8Array
;
/**
*/
clock_ws
():
void
;
/**
*/
clock_dt_ws
():
void
;
/**
*/
clock_st_ws
():
void
;
/**
* @param {number} key
*/
key_press_ws
(
key
:
number
):
void
;
/**
* @param {number} key
*/
key_lift_ws
(
key
:
number
):
void
;
}
export
type
InitInput
=
RequestInfo
|
URL
|
Response
|
BufferSource
|
WebAssembly
.
Module
;
export
interface
InitOutput
{
readonly
memory
:
WebAssembly
.
Memory
;
readonly
__wbg_chip8neo_free
:
(
a
:
number
)
=>
void
;
readonly
chip8neo_new
:
()
=>
number
;
readonly
chip8neo_load_rom_ws
:
(
a
:
number
,
b
:
number
,
c
:
number
)
=>
void
;
readonly
chip8neo_reset_ws
:
(
a
:
number
)
=>
void
;
readonly
chip8neo_reset_hard_ws
:
(
a
:
number
)
=>
void
;
readonly
chip8neo_vram_ws
:
(
a
:
number
,
b
:
number
)
=>
void
;
readonly
chip8neo_clock_ws
:
(
a
:
number
)
=>
void
;
readonly
chip8neo_clock_dt_ws
:
(
a
:
number
)
=>
void
;
readonly
chip8neo_clock_st_ws
:
(
a
:
number
)
=>
void
;
readonly
chip8neo_key_press_ws
:
(
a
:
number
,
b
:
number
)
=>
void
;
readonly
chip8neo_key_lift_ws
:
(
a
:
number
,
b
:
number
)
=>
void
;
readonly
__wbg_chip8classic_free
:
(
a
:
number
)
=>
void
;
readonly
chip8classic_new
:
()
=>
number
;
readonly
__wbindgen_malloc
:
(
a
:
number
)
=>
number
;
readonly
__wbindgen_add_to_stack_pointer
:
(
a
:
number
)
=>
number
;
readonly
__wbindgen_free
:
(
a
:
number
,
b
:
number
)
=>
void
;
readonly
__wbindgen_exn_store
:
(
a
:
number
)
=>
void
;
}
/**
* Synchronously compiles the given `bytes` and instantiates the WebAssembly module.
*
* @param {BufferSource} bytes
*
* @returns {InitOutput}
*/
export
function
initSync
(
bytes
:
BufferSource
):
InitOutput
;
/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {InitInput | Promise<InitInput>} module_or_path
*
* @returns {Promise<InitOutput>}
*/
export
default
function
init
(
module_or_path
?:
InitInput
|
Promise
<
InitInput
>
):
Promise
<
InitOutput
>
;
Loading