dcpu16
10 years agomerge master
Justin Wind [Fri, 25 May 2012 03:12:17 +0000 (20:12 -0700)]
merge

10 years agomerge
Justin Wind [Fri, 25 May 2012 03:05:40 +0000 (20:05 -0700)]
merge

10 years agomerge
Justin Wind [Fri, 25 May 2012 03:05:40 +0000 (20:05 -0700)]
merge

10 years agofurther cleanup of message callback changes
Justin Wind [Fri, 25 May 2012 01:38:38 +0000 (18:38 -0700)]
further cleanup of message callback changes

10 years agofurther cleanup of message callback changes
Justin Wind [Fri, 25 May 2012 01:38:38 +0000 (18:38 -0700)]
further cleanup of message callback changes

10 years agoadded verbosity command to shell
Justin Wind [Fri, 25 May 2012 00:45:43 +0000 (17:45 -0700)]
added verbosity command to shell

10 years agoconsolidated log message callbacks
Justin Wind [Fri, 25 May 2012 00:32:13 +0000 (17:32 -0700)]
consolidated log message callbacks

replaced warn_cb_ and trace_cb_ with more generic msg_cb_

10 years agotypo, missing semicolon
Justin Wind [Wed, 23 May 2012 21:42:02 +0000 (14:42 -0700)]
typo, missing semicolon

10 years agomerge: expanded accounting-event coverage, rewrote cycle timing
Justin Wind [Wed, 23 May 2012 20:28:19 +0000 (13:28 -0700)]
merge: expanded accounting-event coverage, rewrote cycle timing

Registering an accounting hook now requires a range of addresses of interest.
Accounting events now cover register accesses, indexed as address.

Cycle timing now uses all struct timespec.  This introduced another portability condit

10 years agoexpanded accounting-event coverage, rewrote cycle timing
Justin Wind [Tue, 22 May 2012 20:26:05 +0000 (13:26 -0700)]
expanded accounting-event coverage, rewrote cycle timing

Registering an accounting hook now requires a range of addresses of interest.
Accounting events now cover register accesses, indexed as address.

Cycle timing now uses all struct timespec.  This introduced another portability conditional between os x and posix.

10 years agomoved module/hw fields around
Justin Wind [Mon, 21 May 2012 02:03:13 +0000 (19:03 -0700)]
moved module/hw fields around

10 years agofinished reorg of abstracted module interfaces
Justin Wind [Sun, 20 May 2012 21:57:35 +0000 (14:57 -0700)]
finished reorg of abstracted module interfaces

all hw modules now controllable via single generic ctl function.

10 years agofurther reorg of module abstraction and control interface
Justin Wind [Sun, 20 May 2012 20:52:09 +0000 (13:52 -0700)]
further reorg of module abstraction and control interface

10 years agomodualarized 'hardware' api changes complete
Justin Wind [Fri, 18 May 2012 00:53:24 +0000 (17:53 -0700)]
modualarized 'hardware' api changes complete

10 years agoinitial api changes to support hw_ devices as more-generic attachable modules
Justin Wind [Thu, 17 May 2012 23:06:59 +0000 (16:06 -0700)]
initial api changes to support hw_ devices as more-generic attachable modules

generalizing hw handling routines

10 years agocleanup warnings in gcc, fixed some hw module cleanup routines
Justin Wind [Thu, 17 May 2012 22:22:49 +0000 (15:22 -0700)]
cleanup warnings in gcc, fixed some hw module cleanup routines

10 years agocycles now correctly accounted for
Justin Wind [Thu, 17 May 2012 21:11:41 +0000 (14:11 -0700)]
cycles now correctly accounted for

Previously, hardware &c was only signaled for a cycle once per instruction step, rather than for the full count of cycles the instruction took.

10 years agoactually use ring buffer in hw_keyboard.c
Justin Wind [Wed, 16 May 2012 05:07:28 +0000 (22:07 -0700)]
actually use ring buffer in hw_keyboard.c

10 years agojust rearranging Makefile for linux
Justin Wind [Wed, 16 May 2012 02:58:41 +0000 (19:58 -0700)]
just rearranging Makefile for linux

10 years agokeyboard now processes keys via rfb. framework in place for multiple modules.
Justin Wind [Tue, 15 May 2012 07:08:55 +0000 (00:08 -0700)]
keyboard now processes keys via rfb.  framework in place for multiple modules.

Continuing refinement to hardware-module interfaces and driver internals while wiring up vnc library.

10 years agofixed palette-to-color conversion
Justin Wind [Mon, 14 May 2012 04:25:05 +0000 (21:25 -0700)]
fixed palette-to-color conversion

wups, was shifting the wrong number of bits

10 years agofixed typo in POP looking at wrong register
Justin Wind [Sun, 13 May 2012 17:04:02 +0000 (10:04 -0700)]
fixed typo in POP looking at wrong register

10 years agostarting to add timing to vm driver
Justin Wind [Sun, 13 May 2012 16:40:54 +0000 (09:40 -0700)]
starting to add timing to vm driver

not quite there yet, but starting to get it running at 'real time' speed, rather than as fast as possible

10 years agoadded doc files, test for display
Justin Wind [Sat, 12 May 2012 22:10:02 +0000 (15:10 -0700)]
added doc files, test for display

10 years agofixed bug with instruction decoding in dcpu, fixed bugs in display
Justin Wind [Sat, 12 May 2012 22:05:46 +0000 (15:05 -0700)]
fixed bug with instruction decoding in dcpu, fixed bugs in display

non-basic instructions had been consuming too many words.
display now draws on screen

10 years agofurther changes for v1.7: cpu fixes, support for 'hardware' devices, display to vnc
Justin Wind [Sat, 12 May 2012 18:55:51 +0000 (11:55 -0700)]
further changes for v1.7: cpu fixes, support for 'hardware' devices, display to vnc

small changes throughout for 1.7, normalized some variable names, all registers now indexable in array.  fixed behavior of branch-skip.  changes to hw interfaces.
added initial clock, keyboard, and display modules.
display module now supports rendering as vnc server.

hardware devices are still somewhat incomplete and lack testing.

10 years agov1.7 spec mostly implemented, mostly untested
Justin Wind [Wed, 9 May 2012 03:28:01 +0000 (20:28 -0700)]
v1.7 spec mostly implemented, mostly untested
changed cpu to work as per v1.7 specification, minor additional work still needed
added interrupts, hardware interface, new opcodes/operands

10 years agodcpu16 spec updated to v1.7, no code changes yet
Justin Wind [Sat, 5 May 2012 19:38:44 +0000 (12:38 -0700)]
dcpu16 spec updated to v1.7, no code changes yet

10 years agotypo fix
Justin Wind [Sat, 5 May 2012 18:47:56 +0000 (11:47 -0700)]
typo fix

10 years agominor cleanup
Justin Wind [Fri, 4 May 2012 22:04:57 +0000 (15:04 -0700)]
minor cleanup

quiet some gcc warnings

10 years agominor linux portability for buffered image writes
Justin Wind [Fri, 4 May 2012 21:45:28 +0000 (14:45 -0700)]
minor linux portability for buffered image writes

10 years agosupport png output, buffered file writing
Justin Wind [Fri, 4 May 2012 21:26:53 +0000 (14:26 -0700)]
support png output, buffered file writing

Now uses libpng to generate image files, if available.
Writes image files into memory buffer first, writes out to disk no more than once every few seconds.

10 years agominor cleanups to display and callback routines
Justin Wind [Mon, 23 Apr 2012 21:24:51 +0000 (14:24 -0700)]
minor cleanups to display and callback routines

changed some names/structs/typedefs around, mostly aesthetical

10 years agofixes for assembler - label addrs and DAT statements
Justin Wind [Sun, 22 Apr 2012 20:20:10 +0000 (13:20 -0700)]
fixes for assembler - label addrs and DAT statements

Assembler now handles DATs correctly, fixed some issues with labels getting incorrect addresses.
Assembler still does not correctly generate short-form addresses, though.

Added README file.

10 years agotile rendering for chargen now working correctly
Justin Wind [Sun, 22 Apr 2012 18:25:57 +0000 (11:25 -0700)]
tile rendering for chargen now working correctly

resolved small bugs in rendering textmode cells to display buffer

10 years agoinitial support for a display module, incomplete
Justin Wind [Sat, 21 Apr 2012 19:37:17 +0000 (12:37 -0700)]
initial support for a display module, incomplete

Added basic support for an optional display buffer output module, which is currently just written out to a PNM file on each screen update.
Tile rendering needs some further work&tests.

10 years agoadded user data to event callbacks
Justin Wind [Thu, 19 Apr 2012 22:02:34 +0000 (15:02 -0700)]
added user data to event callbacks

watchpoint callbacks now include a pointer to user-specified data

10 years agoadded cpu context to event callbacks
Justin Wind [Thu, 19 Apr 2012 20:08:06 +0000 (13:08 -0700)]
added cpu context to event callbacks

watchpoint callbacks now include a pointer to the cpu structure.

10 years agoremoved checks for setting literal operands
Justin Wind [Thu, 19 Apr 2012 19:09:30 +0000 (12:09 -0700)]
removed checks for setting literal operands

opcodes just set the scratch register the literal is stored in, causing no harm nor later effect.
also added _XOPEN_SOURCE=600 define to Makefile, now compiles cleanly on both darwin and linux.

10 years agominor portability enhancements
Justin Wind [Wed, 18 Apr 2012 21:25:27 +0000 (14:25 -0700)]
minor portability enhancements

missed some headers, use sigaction() instead of signal()

10 years agominor cleanup of verbosity
Justin Wind [Wed, 18 Apr 2012 03:03:47 +0000 (20:03 -0700)]
minor cleanup of verbosity

10 years agoredid line tokenizer
Justin Wind [Wed, 18 Apr 2012 01:46:22 +0000 (18:46 -0700)]
redid line tokenizer

cleanup, minor refactoring, addressed minor stringhandling bugs

10 years agofixing sloppy errors introduced with new strqtok
Justin Wind [Tue, 17 Apr 2012 19:45:41 +0000 (12:45 -0700)]
fixing sloppy errors introduced with new strqtok
prior commit broke things, this one works better

10 years agobegan support for DAT assembler directive
Justin Wind [Mon, 16 Apr 2012 23:02:51 +0000 (16:02 -0700)]
began support for DAT assembler directive

initial support for DAT in assembler
moved some common routines out to shared non-exported module

10 years agogeneralized list handling of instructions and labels
Justin Wind [Sat, 14 Apr 2012 19:49:40 +0000 (12:49 -0700)]
generalized list handling of instructions and labels

Instructions and labels are now kept in growable arrays, using common interface.

10 years agocleaned up verbosity in vm-dcpu16.c
Justin Wind [Fri, 13 Apr 2012 22:01:43 +0000 (15:01 -0700)]
cleaned up verbosity in vm-dcpu16.c

10 years agoremoved old skip code
Justin Wind [Fri, 13 Apr 2012 21:46:58 +0000 (14:46 -0700)]
removed old skip code

10 years agocleanup, simplified event callbacks, step now consumes branch-skipped instructions
Justin Wind [Fri, 13 Apr 2012 21:31:30 +0000 (14:31 -0700)]
cleanup, simplified event callbacks, step now consumes branch-skipped instructions

10 years agofixed instruction length issue
Justin Wind [Fri, 13 Apr 2012 19:14:27 +0000 (12:14 -0700)]
fixed instruction length issue

dcpu16.c: fixed instruction length issues
dcpu16.c: fixed and cleaned up disassembly function
vm-dcpu16.c: fixed argument handling for some commands

10 years agobugfix in event accounting
Justin Wind [Fri, 13 Apr 2012 04:05:23 +0000 (21:05 -0700)]
bugfix in event accounting

10 years agoadded callback support for memory access
Justin Wind [Fri, 13 Apr 2012 03:37:34 +0000 (20:37 -0700)]
added callback support for memory access

Basic support in place for registering callbacks which get called on ram access events.

10 years agobetter shell loop
Justin Wind [Thu, 12 Apr 2012 23:14:55 +0000 (16:14 -0700)]
better shell loop

cleaned up vm-dcpu16.c, made the shell loop simpler and better

10 years agovm-dcpu16 shell rewritten to be use command table
Justin Wind [Thu, 12 Apr 2012 05:31:31 +0000 (22:31 -0700)]
vm-dcpu16 shell rewritten to be use command table

minor cleanups all around, redid entirety of main driver routine in vm shell

10 years agoseparated vm-dcpu16.c cli driver wrapper from vm emulator core
Justin Wind [Wed, 11 Apr 2012 03:28:35 +0000 (20:28 -0700)]
separated vm-dcpu16.c cli driver wrapper from vm emulator core

10 years agoadded tests/test.bin
Justin Wind [Wed, 11 Apr 2012 01:24:01 +0000 (18:24 -0700)]
added tests/test.bin

test.bin is just test.s correctly assembled

10 years agoredid value_bits_ and assorted cleanup
Justin Wind [Wed, 11 Apr 2012 01:06:24 +0000 (18:06 -0700)]
redid value_bits_ and assorted cleanup

value_bits_ can now handle labels in odd places

10 years agoassembler functional now
Justin Wind [Tue, 10 Apr 2012 20:43:31 +0000 (13:43 -0700)]
assembler functional now

10 years agoactually commit minor cleanups
Justin Wind [Tue, 10 Apr 2012 19:08:32 +0000 (12:08 -0700)]
actually commit minor cleanups

hah, still acclimating to git

10 years agominor cleanups, added docs and test files
Justin Wind [Tue, 10 Apr 2012 19:06:24 +0000 (12:06 -0700)]
minor cleanups, added docs and test files

10 years agoassembler functional
Justin Wind [Tue, 10 Apr 2012 05:00:19 +0000 (22:00 -0700)]
assembler functional

10 years agoinitial commit
Justin Wind [Sun, 8 Apr 2012 22:12:52 +0000 (15:12 -0700)]
initial commit