aboutsummaryrefslogtreecommitdiff
path: root/doc/lem1802.txt
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2012-04-25 23:15:02 +0000
committerDimitri Sokolyuk <demon@dim13.org>2012-04-25 23:15:02 +0000
commit4e946e3c1783e48133b861ee5542c88647d1eb6d (patch)
tree9d43acd11ae5981395f5c8abc86e0166a0527f8e /doc/lem1802.txt
parentbb6cb77863e2b6d0e84c698b5b0530d86b6f985c (diff)
move docs to doc/
Diffstat (limited to 'doc/lem1802.txt')
-rw-r--r--doc/lem1802.txt106
1 files changed, 106 insertions, 0 deletions
diff --git a/doc/lem1802.txt b/doc/lem1802.txt
new file mode 100644
index 0000000..4db2f42
--- /dev/null
+++ b/doc/lem1802.txt
@@ -0,0 +1,106 @@
+NE_LEM1802 v1.0
+
+ \ | ___
+ |\ \| ___
+ | \
+
+ NYA ELEKTRISKA
+ innovation information
+
+
+
+
+DCPU-16 Hardware Info:
+ Name: LEM1802 - Low Energy Monitor
+ ID: 0x7349f615, version: 0x1802
+ Manufacturer: 0x1c6c8b36 (NYA_ELEKTRISKA)
+
+
+Description:
+ The LEM1802 is a 128x96 pixel color display compatible with the DCPU-16.
+ The display is made up of 32x12 16 bit cells. Each cell displays one
+ monochrome 4x8 pixel character out of 128 available. Each cell has its own
+ foreground and background color out of a palette of 16 colors.
+
+ The LEM1802 is fully backwards compatible with LEM1801 (0x7349f615/0x1801),
+ and adds support for custom palettes and fixes the double buffer color
+ bleed bug.
+
+
+Interrupt behavior:
+ When a HWI is received by the LEM1802, it reads the A register and does one
+ of the following actions:
+
+ 0: MEM_MAP_SCREEN
+ Reads the B register, and maps the video ram to DCPU-16 ram starting
+ at address B. See below for a description of video ram.
+ If B is 0, the screen is disconnected.
+ When the screen goes from 0 to any other value, the the LEM1802 takes
+ about one second to start up. Other interrupts sent during this time
+ are still processed.
+ 1: MEM_MAP_FONT
+ Reads the B register, and maps the font ram to DCPU-16 ram starting
+ at address B. See below for a description of font ram.
+ If B is 0, the default font is used instead.
+ 2: MEM_MAP_PALETTE
+ Reads the B register, and maps the palette ram to DCPU-16 ram starting
+ at address B. See below for a description of palette ram.
+ If B is 0, the default palette is used instead.
+ 3: SET_BORDER_COLOR
+ Reads the B register, and sets the border color to palette index B&0xF
+ 4: MEM_DUMP_FONT
+ Reads the B register, and writes the default font data to DCPU-16 ram
+ starting at address B.
+ Halts the DCPU-16 for 256 cycles
+ 5: MEM_DUMP_PALETTE
+ Reads the B register, and writes the default palette data to DCPU-16
+ ram starting at address B.
+ Halts the DCPU-16 for 16 cycles
+
+
+Video ram:
+ The LEM1802 has no internal video ram, but rather relies on being assigned
+ an area of the DCPU-16 ram. The size of this area is 386 words, and is
+ made up of 32x12 cells of the following bit format (in LSB-0):
+ ffffbbbbBccccccc
+ The lowest 7 bits (ccccccc) select define character to display.
+ ffff and bbbb select which foreground and background color to use.
+ If B (bit 7) is set the character color will blink slowly.
+
+
+Font ram:
+ The LEM1802 has a default built in font. If the user chooses, they may
+ supply their own font by mapping a 256 word memory region with two words
+ per character in the 128 character font.
+ By setting bits in these words, different characters and graphics can be
+ achieved. For example, the character F looks like this:
+ word0 = 1111111100001001
+ word1 = 0000100100000000
+ Or, split into octets:
+ word0 = 11111111 /
+ 00001001
+ word1 = 00001001 /
+ 00000000
+
+
+Palette ram:
+ The LEM1802 has a default built in palette. If the user chooses, they may
+ supply their own palette by mapping a 16 word memory region with one word
+ per palette entry in the 16 color palette.
+ Each color entry has the following bit format (in LSB-0):
+ 0000rrrrggggbbbb
+ Where r, g, b are the red, green and blue channels. A higher value means a
+ lighter color.
+
+
+A message from Ola:
+ Hello!
+
+ It is fun to see that so many people use our products. When I was a small
+ boy, my dad used to tell me "Ola, take care of those who understand less
+ than you. Lack of knowledge is dangerous, but too much is worse".
+ Here at Nya Elektriska have we always tried to improve mankind by showing
+ them the tools required to improve and reach their true potential.
+ Together, you will wake up in time.
+
+ - Ola Kristian Carlsson \ No newline at end of file