/* write a string on screen */ void pdp1_state::pdp1_draw_string(bitmap_ind16 &bitmap, const char *buf, int x, int y, int color) { while (* buf) { pdp1_draw_char(bitmap, *buf, x, y, color); x += 8; buf++; } }
/* write a string on screen */ static void pdp1_draw_string(mame_bitmap *bitmap, const char *buf, int x, int y, int color) { while (* buf) { pdp1_draw_char(bitmap, *buf, x, y, color); x += 8; buf++; } }
void pdp1_state::pdp1_typewriter_drawchar(int character) { static const char ascii_table[2][64] = { /* n-s = non-spacing */ { /* lower case */ ' ', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '*', '*', '*', '*', '*', '0', '/', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '*', ',', '*',/*black*/ '*',/*red*/ '*',/*Tab*/ '*', '\200',/*n-s middle dot*/'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', '*', '*', '-', ')', '\201',/*n-s overstrike*/'(', '*', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '*',/*Lower Case*/ '.', '*',/*Upper Case*/ '*',/*Backspace*/ '*', '*'/*Carriage Return*/ }, { /* upper case */ ' ', '"', '\'', '~', '\202',/*implies*/ '\203',/*or*/ '\204',/*and*/ '<', '>', '\205',/*up arrow*/ '*', '*', '*', '*', '*', '*', '\206',/*right arrow*/'?', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '*', '=', '*',/*black*/ '*',/*red*/ '*',/*Tab*/ '*', '_',/*n-s???*/ 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', '*', '*', '+', ']', '|',/*n-s???*/ '[', '*', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', '*',/*Lower Case*/ '\207',/*multiply*/ '*',/*Upper Case*/ '*',/*Backspace*/ '*', '*'/*Carriage Return*/ } }; character &= 0x3f; switch (character) { case 034: /* Black */ m_typewriter_color = color_typewriter_black; break; case 035: /* Red */ m_typewriter_color = color_typewriter_red; break; case 036: /* Tab */ m_pos = m_pos + tab_step - (m_pos % tab_step); break; case 072: /* Lower case */ m_case_shift = 0; break; case 074: /* Upper case */ m_case_shift = 1; break; case 075: /* Backspace */ if (m_pos) m_pos--; break; case 077: /* Carriage Return */ m_pos = 0; pdp1_typewriter_linefeed(); break; default: /* Any printable character... */ if (m_pos >= 80) { /* if past right border, wrap around. (Right???) */ pdp1_typewriter_linefeed(); /* next line */ m_pos = 0; /* return to start of line */ } /* print character (lookup ASCII equivalent in table) */ pdp1_draw_char(m_typewriter_bitmap, ascii_table[m_case_shift][character], 8*m_pos, typewriter_write_offset_y, m_typewriter_color); /* print char */ if ((character!= 040) && (character!= 056)) /* 040 and 056 are non-spacing characters */ m_pos++; /* step carriage forward */ break; } }