X-Git-Url: http://git.squeep.com/?p=dcpu16;a=blobdiff_plain;f=docs%2Flem1802.txt;fp=docs%2Flem1802.txt;h=4db2f42c3fcda872e2949bcc9db8546c7bd61a36;hp=0000000000000000000000000000000000000000;hb=19bb0a4e64c9ab3e62ff4bbd959289704ee5b8f1;hpb=0a6b0889c67675bd71681ec41774d2ea57ce5335 diff --git a/docs/lem1802.txt b/docs/lem1802.txt new file mode 100644 index 0000000..4db2f42 --- /dev/null +++ b/docs/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