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

12 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

12 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

12 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.

12 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

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

12 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.

12 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

12 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

12 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

12 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

12 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

12 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.

12 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

12 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

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

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

quiet some gcc warnings

12 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

12 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.

12 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

12 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.

12 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

12 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.

12 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

12 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.

12 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.

12 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()

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

12 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

12 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

12 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

12 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.

12 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

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

12 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

12 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

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

12 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.

12 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

12 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

12 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

12 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

12 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

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

12 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

12 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

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

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