more preset work

This commit is contained in:
Steven Hugg 2017-04-06 16:52:03 -04:00
parent 2667b7051f
commit ce4cb791db
6 changed files with 631 additions and 233 deletions

View File

@ -2,7 +2,8 @@
#include <string.h>
typedef unsigned char byte;
typedef unsigned char word;
typedef signed char sbyte;
typedef unsigned short word;
volatile __sfr __at (0x0) input0;
volatile __sfr __at (0x1) input1;
@ -17,6 +18,9 @@ byte __at (0x2400) vidmem[224][32]; // 256x224x1 video memory
#define FIRE1 (input1 & 0x10)
#define LEFT1 (input1 & 0x20)
#define RIGHT1 (input1 & 0x40)
#define COIN1 (input1 & 0x1)
#define START1 (input1 & 0x4)
#define START2 (input1 & 0x2)
void scanline96() __interrupt;
void scanline224() __interrupt;
@ -60,10 +64,14 @@ void scanline96() __interrupt {
/// GRAPHICS FUNCTIONS
/*
void draw_hline(byte y, byte x1, byte x2) {
void clrscr() {
memset(vidmem, 0, sizeof(vidmem));
}
inline void xor_pixel(byte x, byte y) {
byte* dest = &vidmem[x][y>>3];
*dest ^= 0x1 << (y&7);
}
*/
void draw_vline(byte x, byte y1, byte y2) {
byte yb1 = y1/8;
@ -88,31 +96,6 @@ const byte font8x8[HICHAR-LOCHAR+1][8] = {
{ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, { 0x00,0x00,0x00,0x79,0x79,0x00,0x00,0x00 }, { 0x00,0x70,0x70,0x00,0x00,0x70,0x70,0x00 }, { 0x14,0x7f,0x7f,0x14,0x14,0x7f,0x7f,0x14 }, { 0x00,0x12,0x3a,0x6b,0x6b,0x2e,0x24,0x00 }, { 0x00,0x63,0x66,0x0c,0x18,0x33,0x63,0x00 }, { 0x00,0x26,0x7f,0x59,0x59,0x77,0x27,0x05 }, { 0x00,0x00,0x00,0x10,0x30,0x60,0x40,0x00 }, { 0x00,0x00,0x1c,0x3e,0x63,0x41,0x00,0x00 }, { 0x00,0x00,0x41,0x63,0x3e,0x1c,0x00,0x00 }, { 0x08,0x2a,0x3e,0x1c,0x1c,0x3e,0x2a,0x08 }, { 0x00,0x08,0x08,0x3e,0x3e,0x08,0x08,0x00 }, { 0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00 }, { 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00 }, { 0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00 }, { 0x00,0x01,0x03,0x06,0x0c,0x18,0x30,0x20 }, { 0x00,0x3e,0x7f,0x49,0x51,0x7f,0x3e,0x00 }, { 0x00,0x01,0x11,0x7f,0x7f,0x01,0x01,0x00 }, { 0x00,0x23,0x67,0x45,0x49,0x79,0x31,0x00 }, { 0x00,0x22,0x63,0x49,0x49,0x7f,0x36,0x00 }, { 0x00,0x0c,0x0c,0x14,0x34,0x7f,0x7f,0x04 }, { 0x00,0x72,0x73,0x51,0x51,0x5f,0x4e,0x00 }, { 0x00,0x3e,0x7f,0x49,0x49,0x6f,0x26,0x00 }, { 0x00,0x60,0x60,0x4f,0x5f,0x70,0x60,0x00 }, { 0x00,0x36,0x7f,0x49,0x49,0x7f,0x36,0x00 }, { 0x00,0x32,0x7b,0x49,0x49,0x7f,0x3e,0x00 }, { 0x00,0x00,0x00,0x12,0x12,0x00,0x00,0x00 }, { 0x00,0x00,0x00,0x13,0x13,0x00,0x00,0x00 }, { 0x00,0x08,0x1c,0x36,0x63,0x41,0x41,0x00 }, { 0x00,0x14,0x14,0x14,0x14,0x14,0x14,0x00 }, { 0x00,0x41,0x41,0x63,0x36,0x1c,0x08,0x00 }, { 0x00,0x20,0x60,0x45,0x4d,0x78,0x30,0x00 }, { 0x00,0x3e,0x7f,0x41,0x59,0x79,0x3a,0x00 }, { 0x00,0x1f,0x3f,0x68,0x68,0x3f,0x1f,0x00 }, { 0x00,0x7f,0x7f,0x49,0x49,0x7f,0x36,0x00 }, { 0x00,0x3e,0x7f,0x41,0x41,0x63,0x22,0x00 }, { 0x00,0x7f,0x7f,0x41,0x63,0x3e,0x1c,0x00 }, { 0x00,0x7f,0x7f,0x49,0x49,0x41,0x41,0x00 }, { 0x00,0x7f,0x7f,0x48,0x48,0x40,0x40,0x00 }, { 0x00,0x3e,0x7f,0x41,0x49,0x6f,0x2e,0x00 }, { 0x00,0x7f,0x7f,0x08,0x08,0x7f,0x7f,0x00 }, { 0x00,0x00,0x41,0x7f,0x7f,0x41,0x00,0x00 }, { 0x00,0x02,0x03,0x41,0x7f,0x7e,0x40,0x00 }, { 0x00,0x7f,0x7f,0x1c,0x36,0x63,0x41,0x00 }, { 0x00,0x7f,0x7f,0x01,0x01,0x01,0x01,0x00 }, { 0x00,0x7f,0x7f,0x30,0x18,0x30,0x7f,0x7f }, { 0x00,0x7f,0x7f,0x38,0x1c,0x7f,0x7f,0x00 }, { 0x00,0x3e,0x7f,0x41,0x41,0x7f,0x3e,0x00 }, { 0x00,0x7f,0x7f,0x48,0x48,0x78,0x30,0x00 }, { 0x00,0x3c,0x7e,0x42,0x43,0x7f,0x3d,0x00 }, { 0x00,0x7f,0x7f,0x4c,0x4e,0x7b,0x31,0x00 }, { 0x00,0x32,0x7b,0x49,0x49,0x6f,0x26,0x00 }, { 0x00,0x40,0x40,0x7f,0x7f,0x40,0x40,0x00 }, { 0x00,0x7e,0x7f,0x01,0x01,0x7f,0x7e,0x00 }, { 0x00,0x7c,0x7e,0x03,0x03,0x7e,0x7c,0x00 }, { 0x00,0x7f,0x7f,0x06,0x0c,0x06,0x7f,0x7f }, { 0x00,0x63,0x77,0x1c,0x1c,0x77,0x63,0x00 }, { 0x00,0x70,0x78,0x0f,0x0f,0x78,0x70,0x00 }, { 0x00,0x43,0x47,0x4d,0x59,0x71,0x61,0x00 }, { 0x00,0x00,0x7f,0x7f,0x41,0x41,0x00,0x00 }, { 0x00,0x20,0x30,0x18,0x0c,0x06,0x03,0x01 }, { 0x00,0x00,0x41,0x41,0x7f,0x7f,0x00,0x00 }, { 0x00,0x08,0x18,0x3f,0x3f,0x18,0x08,0x00 }
};
const byte player_bitmap[] =
{2,27,0,0,0,0,0x0f,0x00,0x3e,0x00,0xf4,0x07,0xec,0x00,0x76,0x00,0x2b,0x00,0x33,0x00,0x75,0x00,0xf5,0x00,0xeb,0x31,0xbf,0xef,0x3f,0xcf,0xbf,0xef,0xeb,0x31,0xf5,0x00,0x75,0x00,0x33,0x00,0x2b,0x00,0x76,0x00,0xec,0x00,0xf4,0x07,0x3e,0x00,0x0f,0x00,0x00,0x00,0,0}
;
const byte bullet_bitmap2[] =
{4,2,0,0x88,0x88,0,0,0x44,0x44,0,}
;
const byte bullet_bitmap[] =
{2,2,0x88,0x88,0x44,0x44}
;
const byte enemy1_bitmap[] =
{2,17,0x00,0x00,0x00,0x0c,0x04,0x1e,0x46,0x3f,0xb8,0x7f,0xb0,0x7f,0xba,0x7f,0xfd,0x3f,0xfc,0x07,0xfc,0x07,0xfd,0x3f,0xba,0x7f,0xb0,0x7f,0xb8,0x7f,0x46,0x3f,0x04,0x1e,0x00,0x0c};
const byte enemy2_bitmap[] =
{2,16,0x26,0x00,0x59,0x10,0x10,0x30,0x33,0x18,0xe6,0x61,0xc4,0x56,0x03,0x03,0xdc,0x03,0xdc,0x03,0x03,0x03,0xc4,0x56,0xe6,0x61,0x33,0x18,0x10,0x30,0x59,0x10,0x26,0x00};
const byte enemy3_bitmap[] =
{2,16,0x80,0x1f,0xc0,0x03,0xf8,0x3f,0x70,0x00,0xf0,0x01,0xfc,0x07,0xe8,0x01,0xf8,0x03,0xf8,0x03,0xe8,0x01,0xf8,0x07,0xf0,0x01,0x70,0x00,0xf8,0x3f,0xc0,0x03,0x80,0x1f};
const byte enemy4_bitmap[] =
{2,16,0x06,0x00,0x0c,0x00,0x28,0x00,0x70,0x1f,0x84,0x3f,0xde,0x37,0xbb,0x3f,0xf0,0x3f,0xf0,0x3f,0xbb,0x3f,0xde,0x37,0x84,0x3f,0x70,0x1f,0x28,0x00,0x0c,0x00,0x06,0x00};
const byte* const enemy_bitmaps[4] = {
enemy1_bitmap,
enemy2_bitmap,
enemy3_bitmap,
enemy4_bitmap
};
void draw_sprite(const byte* src, byte x, byte y) {
byte i,j;
byte* dest = &vidmem[x][y];
@ -142,6 +125,19 @@ byte xor_sprite(const byte* src, byte x, byte y) {
}
void erase_sprite(const byte* src, byte x, byte y) {
byte i,j;
byte* dest = &vidmem[x][y];
byte w = *src++;
byte h = *src++;
for (j=0; j<h; j++) {
for (i=0; i<w; i++) {
*dest++ &= ~(*src++);
}
dest += 32-w;
}
}
void clear_sprite(const byte* src, byte x, byte y) {
byte i,j;
byte* dest = &vidmem[x][y];
byte w = *src++;
@ -159,7 +155,7 @@ void draw_char(char ch, byte x, byte y) {
const byte* src = &font8x8[(ch-LOCHAR)][0];
byte* dest = &vidmem[x*8][y];
for (i=0; i<8; i++) {
*dest ^= *src;
*dest = *src;
dest += 32;
src += 1;
}
@ -174,20 +170,93 @@ void draw_string(const char* str, byte x, byte y) {
} while (1);
}
void draw_bcd_word(word bcd, byte x, byte y) {
byte j;
x += 3;
for (j=0; j<4; j++) {
draw_char('0'+(bcd&0xf), x, y);
x--;
bcd >>= 4;
}
}
// add two 16-bit BCD values
word bcd_add(word a, word b) {
a; b; // to avoid warning
__asm
ld hl,#4
add hl,sp
ld iy,#2
add iy,sp
ld a,0 (iy)
add a, (hl)
daa
ld c,a
ld a,1 (iy)
inc hl
adc a, (hl)
daa
ld b,a
ld l, c
ld h, b
__endasm;
}
//
// GAME GRAPHICS
//
const byte player_bitmap[] =
{2,27,0,0,0,0,0x0f,0x00,0x3e,0x00,0xf4,0x07,0xec,0x00,0x76,0x00,0x2b,0x00,0x33,0x00,0x75,0x00,0xf5,0x00,0xeb,0x31,0xbf,0xef,0x3f,0xcf,0xbf,0xef,0xeb,0x31,0xf5,0x00,0x75,0x00,0x33,0x00,0x2b,0x00,0x76,0x00,0xec,0x00,0xf4,0x07,0x3e,0x00,0x0f,0x00,0x00,0x00,0,0};
const byte bomb_bitmap[] =
{1,5,0x88,0x55,0x77,0x55,0x88};
const byte bullet_bitmap[] =
{2,2,0x88,0x88,0x44,0x44};
const byte enemy1_bitmap[] =
{2,17,0x00,0x00,0x00,0x0c,0x04,0x1e,0x46,0x3f,0xb8,0x7f,0xb0,0x7f,0xba,0x7f,0xfd,0x3f,0xfc,0x07,0xfc,0x07,0xfd,0x3f,0xba,0x7f,0xb0,0x7f,0xb8,0x7f,0x46,0x3f,0x04,0x1e,0x00,0x0c};
const byte enemy2_bitmap[] =
{2,16,0x26,0x00,0x59,0x10,0x10,0x30,0x33,0x18,0xe6,0x61,0xc4,0x56,0x03,0x03,0xdc,0x03,0xdc,0x03,0x03,0x03,0xc4,0x56,0xe6,0x61,0x33,0x18,0x10,0x30,0x59,0x10,0x26,0x00};
const byte enemy3_bitmap[] =
{2,16,0x80,0x1f,0xc0,0x03,0xf8,0x3f,0x70,0x00,0xf0,0x01,0xfc,0x07,0xe8,0x01,0xf8,0x03,0xf8,0x03,0xe8,0x01,0xf8,0x07,0xf0,0x01,0x70,0x00,0xf8,0x3f,0xc0,0x03,0x80,0x1f};
const byte enemy4_bitmap[] =
{2,16,0x06,0x00,0x0c,0x00,0x28,0x00,0x70,0x1f,0x84,0x3f,0xde,0x37,0xbb,0x3f,0xf0,0x3f,0xf0,0x3f,0xbb,0x3f,0xde,0x37,0x84,0x3f,0x70,0x1f,0x28,0x00,0x0c,0x00,0x06,0x00};
const byte* const enemy_bitmaps[4] = {
enemy1_bitmap,
enemy2_bitmap,
enemy3_bitmap,
enemy4_bitmap
};
//
// GAME CODE
//
byte attract;
byte credits;
byte curplayer;
word score;
byte lives;
#define MAXLIVES 5
byte player_x;
byte bullet_x;
byte bullet_y;
#define MAX_ENTITIES 28
byte bomb_x;
byte bomb_y;
typedef struct {
byte x,y;
const byte* shape; // need const here
} Entity;
} Enemy;
Entity entities[MAX_ENTITIES];
byte entity_index;
byte num_entities;
#define MAX_ENEMIES 28
Enemy enemies[MAX_ENEMIES];
byte enemy_index;
byte num_enemies;
typedef struct {
byte right:1;
@ -196,13 +265,57 @@ typedef struct {
MarchMode this_mode, next_mode;
void init_entities() {
void draw_lives(byte player) {
byte i;
byte n = lives;
byte x = player ? (22-MAXLIVES) : 6;
byte y = 30;
for (i=0; i<MAXLIVES; i++) {
draw_char(i<n?'*':' ', x++, y);
}
}
void draw_score(byte player) {
byte x = player ? 24 : 0;
byte y = 30;
draw_bcd_word(score, x, y);
}
void add_score(word pts) {
if (attract) return;
score = bcd_add(score, pts);
draw_score(curplayer);
}
void xor_player_derez() {
byte i,j;
byte x = player_x+13;
byte y = 8;
byte* rand = 0;
for (j=1; j<=0x1f; j++) {
for (i=0; i<50; i++) {
signed char xx = x + (*rand++ & 0x1f) - 15;
signed char yy = y + (*rand++ & j);
xor_pixel(xx, yy);
}
}
}
void destroy_player() {
xor_player_derez(); // xor derez pattern
xor_sprite(player_bitmap, player_x, 1); // erase ship via xor
xor_player_derez(); // xor 2x to erase derez pattern
player_x = 0xff;
lives--;
}
void init_enemies() {
byte i,x,y,bm;
x=0;
y=26;
bm=0;
for (i=0; i<MAX_ENTITIES; i++) {
Entity* e = &entities[i];
for (i=0; i<MAX_ENEMIES; i++) {
Enemy* e = &enemies[i];
e->x = x;
e->y = y;
e->shape = enemy_bitmaps[bm];
@ -213,29 +326,34 @@ void init_entities() {
bm++;
}
}
num_entities = MAX_ENTITIES;
enemy_index = 0;
num_enemies = MAX_ENEMIES;
this_mode.right = 1;
this_mode.down = 0;
next_mode.right = 1;
next_mode.down = 0;
}
void delete_entity(Entity* e) {
erase_sprite(e->shape, e->x, e->y);
memmove(e, e+1, sizeof(Entity)*(entities-e+MAX_ENTITIES-1));
num_entities--; // update_next_entity() will check entity_index
void delete_enemy(Enemy* e) {
clear_sprite(e->shape, e->x, e->y);
memmove(e, e+1, sizeof(Enemy)*(enemies-e+MAX_ENEMIES-1));
num_enemies--; // update_next_enemy() will check enemy_index
}
void update_next_entity() {
Entity* e;
if (entity_index >= num_entities) {
entity_index = 0;
void update_next_enemy() {
Enemy* e;
if (enemy_index >= num_enemies) {
enemy_index = 0;
memcpy(&this_mode, &next_mode, sizeof(this_mode));
}
e = &entities[entity_index];
erase_sprite(e->shape, e->x, e->y);
e = &enemies[enemy_index];
clear_sprite(e->shape, e->x, e->y);
if (this_mode.down) {
e->y--;
// if too close to ground, end game
if (--e->y < 5) {
destroy_player();
lives = 0;
}
next_mode.down = 0;
} else {
if (this_mode.right) {
@ -253,7 +371,7 @@ void update_next_entity() {
}
}
draw_sprite(e->shape, e->x, e->y);
entity_index++;
enemy_index++;
}
void draw_bunker(byte x, byte y, byte y2, byte h, byte w) {
@ -267,16 +385,31 @@ void draw_bunker(byte x, byte y, byte y2, byte h, byte w) {
}
}
char in_rect(Entity* e, byte x, byte y, byte w, byte h) {
void draw_playfield() {
byte i;
clrscr();
draw_string("PLAYER 1", 0, 31);
draw_score(0);
draw_lives(0);
//draw_string("PLAYER 2", 20, 31);
//draw_score(1);
//draw_lives(1);
for (i=0; i<224; i++)
vidmem[i][0] = 0x7f & 0x55;
draw_bunker(30, 40, 15, 15, 20);
draw_bunker(140, 40, 15, 15, 20);
}
char in_rect(Enemy* e, byte x, byte y, byte w, byte h) {
byte eh = e->shape[0];
byte ew = e->shape[1];
return (x >= e->x-w && x <= e->x+ew && y >= e->y-h && y <= e->y+eh);
}
Entity* find_entity_at(byte x, byte y) {
Enemy* find_enemy_at(byte x, byte y) {
byte i;
for (i=0; i<num_entities; i++) {
Entity* e = &entities[i];
for (i=0; i<num_enemies; i++) {
Enemy* e = &enemies[i];
if (in_rect(e, x, y, 2, 0)) {
return e;
}
@ -285,52 +418,139 @@ Entity* find_entity_at(byte x, byte y) {
}
void check_bullet_hit(byte x, byte y) {
Entity* e = find_entity_at(x,y);
if (e) {
delete_entity(e);
Enemy* e = find_enemy_at(x,y);
if (e) {
delete_enemy(e);
add_score(0x25);
}
}
void gameloop() {
watchdog_strobe = 0b0111 / 14;
draw_bunker(30, 40, 15, 15, 20);
draw_bunker(120, 40, 15, 15, 20);
init_entities();
player_x = 96;
while (1) {
if (LEFT1 && player_x>0) player_x -= 2;
if (RIGHT1 && player_x<200) player_x += 2;
if (FIRE1 && bullet_y == 0) {
bullet_x = player_x + 13;
bullet_y = 3;
xor_sprite(bullet_bitmap, bullet_x, bullet_y); // draw
void fire_bullet() {
bullet_x = player_x + 13;
bullet_y = 3;
xor_sprite(bullet_bitmap, bullet_x, bullet_y); // draw
}
void move_bullet() {
byte leftover = xor_sprite(bullet_bitmap, bullet_x, bullet_y); // erase
if (leftover || bullet_y > 26) {
clear_sprite(bullet_bitmap, bullet_x, bullet_y);
check_bullet_hit(bullet_x, bullet_y+2);
bullet_y = 0;
} else {
bullet_y++;
xor_sprite(bullet_bitmap, bullet_x, bullet_y); // draw
}
}
void drop_bomb() {
Enemy* e = &enemies[enemy_index];
bomb_x = e->x + 7;
bomb_y = e->y - 2;
xor_sprite(bomb_bitmap, bomb_x, bomb_y);
}
void move_bomb() {
byte leftover = xor_sprite(bomb_bitmap, bomb_x, bomb_y); // erase
if (bomb_y < 2) {
bomb_y = 0;
} else if (leftover) {
erase_sprite(bomb_bitmap, bomb_x, bomb_y); // erase bunker
if (bomb_y < 3) {
// player was hit (probably)
destroy_player();
}
draw_sprite(player_bitmap, player_x, 1);
draw_sprite(player_bitmap, player_x, 1);
bomb_y = 0;
} else {
bomb_y--;
xor_sprite(bomb_bitmap, bomb_x, bomb_y);
}
}
byte frame;
void move_player() {
if (attract) {
if (bullet_y == 0) fire_bullet();
} else {
if (LEFT1 && player_x>0) player_x -= 2;
if (RIGHT1 && player_x<198) player_x += 2;
if (FIRE1 && bullet_y == 0) {
fire_bullet();
}
}
draw_sprite(player_bitmap, player_x, 1);
}
void play_round() {
watchdog_strobe = 0;
draw_playfield();
player_x = 96;
bullet_y = 0;
bomb_y = 0;
frame = 0;
while (player_x != 0xff && num_enemies) {
move_player();
if (bullet_y) {
byte leftover = xor_sprite(bullet_bitmap, bullet_x, bullet_y); // erase
if (leftover || bullet_y > 26) {
erase_sprite(bullet_bitmap, bullet_x, bullet_y);
check_bullet_hit(bullet_x, bullet_y+2);
bullet_y = 0;
move_bullet();
}
update_next_enemy();
if (frame & 1) {
if (bomb_y == 0) {
drop_bomb();
} else {
bullet_y++;
xor_sprite(bullet_bitmap, bullet_x, bullet_y); // draw
move_bomb();
}
}
update_next_entity();
watchdog_strobe = 0;
frame++;
}
}
void init_game() {
score = 0;
lives = 5;
curplayer = 0;
}
void game_over_msg() {
byte i;
for (i=0; i<50; i++) {
draw_string(" *************** ", 5, 15);
draw_string("*** ***", 5, 16);
draw_string("** GAME OVER **", 5, 17);
draw_string("*** ***", 5, 18);
draw_string(" *************** ", 5, 19);
watchdog_strobe = 0;
}
}
void clrscr() {
memset(vidmem, 0, sizeof(vidmem));
void play_game() {
attract = 0;
init_game();
init_enemies();
while (lives) {
play_round();
if (num_enemies == 0) {
init_enemies();
}
}
game_over_msg();
}
void attract_mode() {
attract = 1;
while (1) {
init_enemies();
play_round();
}
}
void main() {
// TODO: clear memory
clrscr();
draw_string("PLAYER 1", 0, 31);
draw_string("PLAYER 2", 20, 31);
gameloop();
// NOTE: initializers don't get run, so we init here
credits = 0;
while (1) {
//attract_mode();
play_game();
}
}

View File

@ -2,7 +2,8 @@
#include <string.h>
typedef unsigned char byte;
typedef unsigned char word;
typedef signed char sbyte;
typedef unsigned short word;
__sfr __at (0x2) bitshift_offset;
volatile __sfr __at (0x3) bitshift_read;

View File

@ -1,6 +1,7 @@
#include <string.h>
typedef unsigned char byte;
typedef signed char sbyte;
typedef unsigned short word;
// PLATFORM DEFINITION
@ -156,34 +157,14 @@ void draw_box(byte x, byte y, byte x2, byte y2, const char* chars) {
}
}
void draw_bcd_word(byte x, byte y, word bcd) {
byte j;
x += 3;
for (j=0; j<4; j++) {
putchar(x, y, CHAR('0'+(bcd&0xf)));
x--;
bcd >>= 4;
}
}
/*
void draw_bcd_byte(byte x, byte y, byte bcd) {
putchar(CHAR('0'+(bcd&0xf)), x+1, y);
putchar(CHAR('0'+((bcd>>4)&0xf)), x, y);
}
void draw_bcd_word2(byte x, byte y, word bcd) {
draw_bcd_byte(x+2, y, bcd);
draw_bcd_byte(x, y, bcd>>8);
}
*/
void draw_playfield() {
draw_box(0,0,27,29,BOX_CHARS);
putstring(0,31,"PLAYER 1");
putstring(20,31,"PLAYER 2");
draw_bcd_word(0,30,players[0].score);
draw_bcd_word(24,30,players[1].score);
putstring(0,30,"SCORE:");
putstring(20,30,"SCORE:");
putchar(7,30,CHAR(players[0].score + '0'));
putchar(27,30,CHAR(players[1].score + '0'));
if (attract) {
if (credits) {
putstring(8,29,"PRESS START");
@ -270,28 +251,6 @@ void ai_control(Player* p) {
}
}
// add two 16-bit BCD values
word bcd_add(word a, word b) {
a; b; // to avoid warning
__asm
ld hl,#4
add hl,sp
ld iy,#2
add iy,sp
ld a,0 (iy)
add a, (hl)
daa
ld c,a
ld a,1 (iy)
inc hl
adc a, (hl)
daa
ld b,a
ld l, c
ld h, b
__endasm;
}
void slide_right() {
byte j;
for (j=0; j<32; j++) {
@ -375,10 +334,8 @@ void play_round() {
// don't keep score in attract mode
if (attract) return;
// add scores to players that didn't collide
if (players[0].collided)
players[1].score = bcd_add(players[1].score, 1);
if (players[1].collided)
players[0].score = bcd_add(players[0].score, 1);
if (players[0].collided) players[1].score++;
if (players[1].collided) players[0].score++;
// increase speed
if (frames_per_move > MAX_SPEED) frames_per_move--;
// game over?

View File

@ -5,13 +5,7 @@ typedef unsigned char byte;
typedef unsigned short word;
byte __at (0xc000) palette[16];
volatile byte __at (0xc800) input0;
volatile byte __at (0xc802) input1;
volatile byte __at (0xc804) input2;
byte __at (0xc900) rom_select;
volatile byte __at (0xcb00) video_counter;
byte __at (0xcbff) watchdog0x39;
byte __at (0xcc00) nvram[0x400];
byte __at (0x0) vidmem[152][256]; // 256x304x4bpp video memory
@ -28,51 +22,65 @@ __endasm;
}
const byte example_tga[] = {
0x00,0x01,0x09,0x00,0x00,0x08,0x00,0x18,0x00,0x00,0x00,0x00,0x80,0x00,0x60,0x00,0x08,0x00,0x01,0x01,0x01,0x67,0x3b,0x4e,0x9f,0x43,0x58,0xc5,0x56,0xbe,0xac,0xa8,0xac,0xe3,0xe0,0xe0,0xde,0xab,0xbc,0xd6,0xa5,0x72,0xff,0x00,0xff,0x00,0xd1,0x00,0x02,0x01,0x03,0x03,0xaa,0x00,0xd1,0x00,0x01,0x03,0x03,0xab,0x00,0xd1,0x00,0x01,0x03,0x03,0xab,0x00,0xcf,0x00,0x02,0x01,0x03,0x03,0xac,0x00,0xd0,0x00,0x01,0x03,0x03,0xac,0x00,0xb3,0x00,0x02,0x03,0x03,0x00,0x82,0x03,0x95,0x00,0x01,0x03,0x03,0xad,0x00,0xb2,0x00,0x86,0x03,0x95,0x00,0x02,0x03,0x03,0x01,0xac,0x00,0xb1,0x00,0x83,0x03,0x03,0x01,0x01,0x03,0x03,0x94,0x00,0x01,0x03,0x03,0xae,0x00,0xb0,0x00,
0x00,0x01,0x82,0x03,0x04,0x00,0x01,0x01,0x06,0x03,0x94,0x00,0x00,0x03,0xaf,0x00,0xb0,0x00,0x82,0x03,0x04,0x01,0x01,0x03,0x03,0x06,0x95,0x00,0x00,0x03,0xaf,0x00,0xb0,0x00,0x01,0x03,0x03,0x82,0x01,0x82,0x03,0x90,0x00,0x05,0x01,0x03,0x03,0x01,0x03,0x03,0xaf,0x00,0xaf,0x00,0x82,0x03,0x01,0x01,0x01,0x82,0x03,0x91,0x00,0x84,0x03,0xb0,0x00,0xae,0x00,0x00,0x01,0x82,0x03,0x00,0x02,0x82,0x03,0x02,0x01,0x00,0x01,0x84,0x00,0x82,0x03,0x86,0x00,0x85,0x03,0x00,0x01,0xaf,0x00,0xae,0x00,0x8b,0x03,0x83,0x00,0x82,0x03,0x85,0x00,0x83,0x03,0x01,0x06,0x03,0xb1,0x00,0x96,0x00,0x08,0x05,0x03,0x06,0x03,0x03,0x06,0x03,0x06,0x06,0x82,0x03,0x01,0x05,0x06,0x82,
0x03,0x06,0x06,0x03,0x06,0x06,0x03,0x06,0x06,0x8c,0x03,0x00,0x06,0x8e,0x03,0x01,0x06,0x03,0x82,0x00,0x00,0x05,0x82,0x03,0x82,0x06,0x00,0x07,0x84,0x06,0x00,0x07,0x82,0x06,0x82,0x07,0x02,0x06,0x07,0x07,0x83,0x06,0x93,0x00,0x96,0x00,0x00,0x06,0x9c,0x03,0x82,0x01,0x87,0x03,0x00,0x02,0x88,0x03,0x02,0x02,0x03,0x03,0x84,0x00,0x05,0x03,0x01,0x02,0x03,0x02,0x07,0x84,0x02,0x00,0x07,0x83,0x02,0x05,0x07,0x02,0x07,0x07,0x02,0x02,0x82,0x07,0x00,0x06,0x93,0x00,0x97,0x00,0x06,0x03,0x03,0x01,0x02,0x01,0x01,0x03,0x82,0x01,0x04,0x03,0x03,0x01,0x01,0x03,0x85,0x01,0x85,0x03,0x84,0x01,0x82,0x03,0x00,0x02,0x83,0x03,0x00,0x01,0x88,0x03,0x02,0x02,0x03,0x06,
0x83,0x00,0x01,0x03,0x02,0x82,0x01,0x02,0x02,0x01,0x02,0x82,0x01,0x00,0x02,0x82,0x01,0x82,0x02,0x00,0x01,0x84,0x02,0x01,0x07,0x06,0x94,0x00,0x97,0x00,0x01,0x06,0x03,0x84,0x01,0x04,0x03,0x01,0x01,0x03,0x03,0x87,0x01,0x84,0x03,0x07,0x01,0x00,0x01,0x00,0x01,0x02,0x03,0x06,0x85,0x03,0x00,0x01,0x84,0x03,0x00,0x06,0x82,0x03,0x00,0x01,0x82,0x03,0x83,0x00,0x04,0x03,0x01,0x01,0x02,0x02,0x83,0x01,0x82,0x02,0x84,0x01,0x01,0x02,0x02,0x83,0x01,0x01,0x02,0x07,0x95,0x00,0x98,0x00,0x0a,0x03,0x03,0x01,0x01,0x00,0x01,0x03,0x01,0x01,0x03,0x03,0x88,0x01,0x04,0x03,0x03,0x01,0x01,0x00,0x83,0x01,0x00,0x02,0x82,0x03,0x00,0x01,0x83,0x03,0x00,0x01,0x8b,0x03,
0x83,0x00,0x0c,0x03,0x01,0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x02,0x01,0x01,0x02,0x83,0x01,0x01,0x02,0x02,0x83,0x01,0x02,0x02,0x07,0x06,0x95,0x00,0x99,0x00,0x00,0x03,0x87,0x01,0x01,0x03,0x03,0x86,0x01,0x82,0x03,0x86,0x01,0x82,0x03,0x01,0x02,0x02,0x82,0x03,0x02,0x02,0x03,0x06,0x8a,0x03,0x83,0x00,0x00,0x02,0x84,0x01,0x02,0x07,0x02,0x02,0x86,0x01,0x08,0x02,0x01,0x01,0x02,0x01,0x01,0x02,0x02,0x07,0x96,0x00,0x99,0x00,0x01,0x03,0x03,0x83,0x01,0x04,0x03,0x01,0x01,0x03,0x03,0x86,0x01,0x02,0x03,0x06,0x03,0x84,0x01,0x00,0x02,0x82,0x03,0x82,0x01,0x82,0x03,0x00,0x02,0x85,0x03,0x01,0x01,0x06,0x84,0x03,0x82,0x00,0x02,0x03,0x01,0x00,0x83,0x01,0x05,
0x02,0x07,0x02,0x01,0x01,0x02,0x82,0x01,0x03,0x02,0x02,0x01,0x02,0x82,0x01,0x02,0x02,0x07,0x06,0x96,0x00,0x9a,0x00,0x01,0x03,0x03,0x83,0x01,0x04,0x03,0x01,0x01,0x03,0x03,0x84,0x01,0x82,0x03,0x00,0x02,0x84,0x01,0x82,0x03,0x82,0x01,0x00,0x02,0x83,0x03,0x00,0x02,0x83,0x03,0x0d,0x01,0x01,0x03,0x03,0x01,0x01,0x02,0x06,0x00,0x00,0x03,0x02,0x01,0x02,0x83,0x01,0x01,0x02,0x02,0x89,0x01,0x05,0x02,0x01,0x01,0x02,0x02,0x06,0x97,0x00,0x9a,0x00,0x01,0x06,0x03,0x83,0x01,0x04,0x03,0x01,0x01,0x03,0x03,0x84,0x01,0x82,0x03,0x84,0x01,0x83,0x03,0x83,0x01,0x83,0x03,0x06,0x01,0x01,0x02,0x03,0x02,0x00,0x02,0x83,0x00,0x00,0x02,0x83,0x03,0x00,0x00,0x90,0x01,
0x00,0x02,0x82,0x01,0x01,0x02,0x07,0x98,0x00,0x9b,0x00,0x01,0x03,0x03,0x82,0x01,0x05,0x03,0x03,0x01,0x01,0x03,0x03,0x83,0x01,0x82,0x03,0x83,0x01,0x82,0x03,0x0c,0x01,0x00,0x01,0x01,0x02,0x01,0x01,0x03,0x02,0x00,0x01,0x01,0x00,0x82,0x01,0x07,0x02,0x02,0x01,0x02,0x02,0x01,0x02,0x02,0x85,0x01,0x0c,0x02,0x02,0x01,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x83,0x01,0x02,0x02,0x02,0x06,0x98,0x00,0x9b,0x00,0x01,0x03,0x03,0x83,0x01,0x01,0x03,0x01,0x82,0x03,0x82,0x01,0x83,0x03,0x02,0x01,0x01,0x02,0x82,0x03,0x87,0x01,0x01,0x00,0x00,0x83,0x01,0x00,0x00,0x85,0x01,0x03,0x02,0x01,0x00,0x00,0x83,0x01,0x01,0x02,0x02,0x84,0x01,0x00,0x02,0x84,
0x01,0x83,0x02,0x03,0x01,0x02,0x02,0x06,0x99,0x00,0x9c,0x00,0x02,0x03,0x03,0x02,0x82,0x01,0x03,0x03,0x01,0x03,0x03,0x82,0x01,0x88,0x03,0x07,0x01,0x00,0x01,0x01,0x02,0x01,0x02,0x02,0x82,0x01,0x07,0x02,0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x86,0x02,0x82,0x01,0x0a,0x02,0x02,0x01,0x02,0x02,0x01,0x02,0x02,0x01,0x02,0x02,0x82,0x01,0x82,0x02,0x04,0x01,0x01,0x02,0x07,0x06,0x99,0x00,0x9c,0x00,0x07,0x05,0x03,0x03,0x01,0x01,0x02,0x03,0x04,0x83,0x03,0x00,0x01,0x86,0x03,0x0a,0x01,0x00,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x82,0x02,0x09,0x01,0x02,0x01,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x84,0x02,0x00,0x01,0x83,0x02,0x08,0x01,0x02,0x01,0x02,
0x01,0x02,0x01,0x02,0x01,0x86,0x02,0x01,0x07,0x06,0x9a,0x00,0x9d,0x00,0x06,0x03,0x03,0x02,0x01,0x03,0x01,0x02,0x82,0x03,0x00,0x01,0x82,0x03,0x06,0x01,0x01,0x02,0x01,0x00,0x01,0x01,0x84,0x02,0x00,0x01,0x82,0x02,0x01,0x01,0x01,0x84,0x02,0x07,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x83,0x02,0x06,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x82,0x01,0x01,0x02,0x01,0x87,0x02,0x01,0x07,0x05,0x9a,0x00,0x9e,0x00,0x01,0x03,0x03,0x82,0x01,0x01,0x03,0x02,0x85,0x03,0x84,0x01,0x02,0x02,0x01,0x01,0x82,0x02,0x04,0x01,0x01,0x02,0x02,0x01,0x84,0x02,0x00,0x01,0x84,0x02,0x00,0x01,0x82,0x02,0x00,0x01,0x85,0x02,0x00,0x01,0x87,0x02,0x00,0x01,0x85,0x02,0x01,0x07,
0x06,0x9b,0x00,0x9e,0x00,0x04,0x05,0x03,0x01,0x03,0x01,0x87,0x03,0x83,0x01,0x02,0x02,0x02,0x03,0x98,0x02,0x00,0x01,0x86,0x02,0x00,0x01,0x8c,0x02,0x01,0x06,0x06,0x9b,0x00,0x9e,0x00,0x13,0x05,0x05,0x03,0x03,0x06,0x04,0x04,0x03,0x06,0x06,0x03,0x01,0x03,0x04,0x03,0x03,0x04,0x03,0x03,0x01,0x8c,0x02,0x08,0x03,0x06,0x03,0x04,0x03,0x06,0x03,0x04,0x06,0x82,0x03,0x89,0x02,0x0d,0x01,0x04,0x06,0x03,0x04,0x06,0x06,0x03,0x04,0x04,0x07,0x07,0x05,0x06,0x9b,0x00,0x86,0x00,0xa1,0x05,0x82,0x04,0x85,0x05,0x82,0x03,0x82,0x02,0x00,0x03,0x85,0x02,0x00,0x07,0x8a,0x05,0x00,0x03,0x87,0x02,0x00,0x07,0xaa,0x05,0x84,0x00,0x02,0x05,0x05,0x04,0x94,0x05,0x00,0x04,
0x8c,0x05,0x00,0x04,0x83,0x05,0x00,0x06,0x82,0x05,0x01,0x03,0x03,0x84,0x02,0x03,0x03,0x02,0x02,0x07,0x8b,0x05,0x00,0x03,0x85,0x02,0x0a,0x07,0x06,0x05,0x05,0x04,0x05,0x06,0x05,0x05,0x04,0x06,0x8b,0x05,0x00,0x04,0x83,0x05,0x07,0x04,0x05,0x04,0x05,0x05,0x06,0x05,0x04,0x85,0x05,0x03,0x04,0x05,0x06,0x05,0x82,0x00,0x86,0x05,0x00,0x06,0x92,0x05,0x04,0x04,0x05,0x04,0x05,0x06,0x82,0x05,0x03,0x04,0x05,0x05,0x04,0x82,0x05,0x00,0x04,0x85,0x05,0x82,0x03,0x01,0x02,0x03,0x83,0x02,0x05,0x07,0x07,0x05,0x04,0x05,0x04,0x87,0x05,0x00,0x03,0x84,0x02,0x00,0x07,0x82,0x05,0x00,0x06,0x85,0x05,0x07,0x04,0x05,0x05,0x04,0x05,0x06,0x05,0x06,0x85,0x05,0x00,0x04,
0x87,0x05,0x07,0x04,0x05,0x05,0x04,0x04,0x05,0x04,0x04,0x82,0x05,0x01,0x06,0x00,0x01,0x00,0x00,0x8d,0x05,0x00,0x04,0x89,0x05,0x04,0x06,0x05,0x06,0x05,0x04,0x84,0x05,0x00,0x04,0x88,0x05,0x07,0x04,0x05,0x05,0x04,0x04,0x05,0x03,0x03,0x85,0x02,0x00,0x03,0x8c,0x05,0x00,0x03,0x83,0x02,0x00,0x07,0x86,0x05,0x01,0x06,0x04,0x83,0x05,0x00,0x04,0x84,0x05,0x01,0x04,0x04,0x82,0x05,0x00,0x04,0x82,0x05,0x12,0x04,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x04,0x04,0x05,0x04,0x05,0x04,0x05,0x05,0x04,0x05,0x00,0x00,0x00,0x83,0x05,0x07,0x04,0x04,0x05,0x05,0x04,0x05,0x05,0x04,0x8a,0x05,0x0a,0x04,0x05,0x03,0x06,0x05,0x06,0x05,0x05,0x04,0x05,0x04,0x82,0x05,0x06,
0x04,0x05,0x05,0x04,0x05,0x04,0x04,0x83,0x05,0x00,0x04,0x82,0x05,0x12,0x06,0x03,0x03,0x02,0x03,0x03,0x02,0x07,0x07,0x05,0x06,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x82,0x05,0x0b,0x03,0x03,0x02,0x07,0x07,0x05,0x05,0x06,0x05,0x05,0x04,0x04,0x82,0x05,0x03,0x04,0x05,0x05,0x04,0x82,0x05,0x02,0x04,0x05,0x04,0x84,0x05,0x04,0x04,0x05,0x04,0x05,0x05,0x82,0x04,0x09,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x82,0x04,0x01,0x00,0x00,0x05,0x00,0x05,0x05,0x04,0x04,0x05,0x82,0x04,0x02,0x05,0x05,0x04,0x86,0x05,0x00,0x04,0x85,0x05,0x03,0x03,0x06,0x05,0x04,0x85,0x05,0x04,0x04,0x04,0x05,0x05,0x04,0x83,0x05,0x00,0x04,0x88,0x05,0x05,0x03,0x02,
0x03,0x02,0x02,0x07,0x88,0x05,0x00,0x06,0x83,0x05,0x06,0x03,0x07,0x02,0x07,0x05,0x05,0x04,0x8d,0x05,0x00,0x04,0x86,0x05,0x10,0x04,0x05,0x05,0x04,0x04,0x05,0x04,0x05,0x05,0x04,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x82,0x05,0x03,0x04,0x05,0x00,0x00,0x05,0x00,0x05,0x04,0x05,0x05,0x04,0x82,0x05,0x06,0x04,0x05,0x05,0x04,0x05,0x05,0x04,0x86,0x05,0x0b,0x04,0x05,0x06,0x03,0x06,0x05,0x06,0x05,0x04,0x05,0x04,0x04,0x83,0x05,0x04,0x04,0x04,0x05,0x05,0x04,0x82,0x05,0x15,0x04,0x05,0x04,0x05,0x06,0x05,0x06,0x05,0x03,0x03,0x02,0x02,0x03,0x07,0x05,0x06,0x06,0x04,0x04,0x05,0x04,0x06,0x85,0x05,0x03,0x03,0x02,0x07,0x07,0x86,0x05,0x07,0x04,0x05,0x04,0x05,
0x04,0x05,0x05,0x04,0x84,0x05,0x06,0x06,0x05,0x05,0x06,0x07,0x05,0x04,0x82,0x05,0x12,0x04,0x05,0x05,0x04,0x05,0x04,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x04,0x05,0x04,0x05,0x00,0x00,0x82,0x05,0x05,0x04,0x04,0x05,0x04,0x05,0x05,0x82,0x04,0x11,0x05,0x05,0x04,0x05,0x05,0x06,0x05,0x05,0x04,0x05,0x06,0x06,0x05,0x03,0x03,0x07,0x05,0x04,0x82,0x05,0x0c,0x04,0x05,0x05,0x06,0x05,0x06,0x06,0x04,0x04,0x06,0x04,0x05,0x04,0x83,0x05,0x13,0x04,0x05,0x05,0x04,0x05,0x03,0x03,0x02,0x04,0x07,0x05,0x05,0x04,0x05,0x05,0x04,0x04,0x05,0x04,0x04,0x82,0x05,0x09,0x06,0x05,0x03,0x03,0x07,0x05,0x05,0x04,0x05,0x04,0x84,0x05,0x82,0x06,0x0e,0x04,0x05,0x04,0x05,0x06,
0x04,0x05,0x04,0x04,0x05,0x06,0x07,0x07,0x05,0x04,0x83,0x05,0x82,0x04,0x05,0x05,0x06,0x04,0x05,0x04,0x05,0x82,0x04,0x02,0x05,0x04,0x05,0x82,0x00,0x00,0x05,0x84,0x04,0x02,0x05,0x04,0x04,0x8e,0x05,0x04,0x06,0x03,0x02,0x07,0x05,0x82,0x04,0x03,0x05,0x05,0x04,0x04,0x8a,0x05,0x11,0x04,0x04,0x05,0x05,0x04,0x05,0x04,0x05,0x06,0x03,0x02,0x02,0x07,0x05,0x04,0x05,0x04,0x04,0x84,0x05,0x07,0x04,0x05,0x05,0x04,0x05,0x03,0x07,0x06,0x86,0x05,0x02,0x04,0x05,0x04,0x8b,0x05,0x00,0x06,0x82,0x07,0x07,0x06,0x05,0x05,0x04,0x04,0x05,0x05,0x04,0x8b,0x05,0x83,0x00,0x06,0x05,0x04,0x04,0x05,0x05,0x04,0x04,0x82,0x05,0x00,0x06,0x82,0x03,0x08,0x04,0x06,0x03,0x04,
0x03,0x03,0x06,0x03,0x04,0x82,0x03,0x11,0x02,0x07,0x05,0x07,0x04,0x05,0x04,0x04,0x05,0x04,0x04,0x05,0x06,0x06,0x04,0x04,0x06,0x06,0x82,0x05,0x0f,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x04,0x05,0x03,0x02,0x07,0x05,0x05,0x04,0x04,0x82,0x05,0x14,0x04,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x03,0x06,0x05,0x05,0x06,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x82,0x05,0x16,0x07,0x06,0x05,0x05,0x06,0x06,0x07,0x06,0x05,0x06,0x07,0x02,0x07,0x07,0x06,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x8e,0x00,0x00,0x05,0x86,0x04,0x09,0x05,0x06,0x03,0x03,0x02,0x01,0x03,0x02,0x02,0x03,0x82,0x02,0x00,0x03,0x82,0x02,0x0f,0x03,0x02,0x07,0x05,0x04,0x05,0x04,0x04,0x05,
0x04,0x04,0x06,0x05,0x06,0x03,0x02,0x82,0x03,0x10,0x06,0x06,0x05,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x03,0x02,0x04,0x05,0x05,0x85,0x04,0x1d,0x05,0x04,0x05,0x04,0x05,0x05,0x06,0x05,0x03,0x07,0x05,0x06,0x05,0x04,0x05,0x05,0x04,0x05,0x04,0x05,0x05,0x06,0x03,0x07,0x06,0x05,0x06,0x07,0x07,0x03,0x83,0x07,0x02,0x02,0x07,0x07,0x82,0x04,0x05,0x05,0x04,0x05,0x04,0x04,0x05,0x8e,0x00,0x00,0x05,0x86,0x04,0x01,0x06,0x05,0x83,0x03,0x00,0x02,0x87,0x03,0x09,0x02,0x02,0x03,0x02,0x03,0x05,0x07,0x04,0x05,0x05,0x82,0x04,0x82,0x06,0x14,0x03,0x03,0x02,0x02,0x03,0x03,0x06,0x05,0x05,0x04,0x04,0x05,0x04,0x04,0x06,0x06,0x05,0x03,0x07,0x05,0x06,0x88,
0x04,0x08,0x05,0x04,0x04,0x06,0x04,0x05,0x06,0x07,0x05,0x82,0x04,0x11,0x05,0x04,0x05,0x04,0x04,0x05,0x06,0x03,0x07,0x07,0x06,0x06,0x07,0x03,0x07,0x07,0x06,0x07,0x82,0x02,0x0a,0x07,0x07,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x04,0x05,0x8e,0x00,0x01,0x05,0x05,0x84,0x04,0x01,0x05,0x04,0x82,0x05,0x07,0x06,0x05,0x06,0x06,0x05,0x05,0x03,0x05,0x84,0x03,0x82,0x02,0x00,0x05,0x83,0x04,0x0e,0x05,0x05,0x04,0x05,0x03,0x03,0x05,0x03,0x03,0x02,0x03,0x03,0x07,0x05,0x06,0x86,0x04,0x04,0x06,0x03,0x06,0x05,0x06,0x84,0x04,0x00,0x05,0x84,0x04,0x0a,0x05,0x04,0x04,0x05,0x06,0x05,0x05,0x04,0x05,0x04,0x06,0x82,0x04,0x0c,0x05,0x05,0x03,0x02,0x07,0x06,0x06,0x07,
0x03,0x07,0x02,0x03,0x07,0x83,0x02,0x05,0x07,0x07,0x05,0x04,0x04,0x05,0x84,0x04,0x00,0x05,0x88,0x00,0x00,0x05,0x83,0x00,0x00,0x05,0x88,0x04,0x00,0x05,0x83,0x04,0x01,0x06,0x05,0x82,0x04,0x00,0x06,0x82,0x05,0x82,0x03,0x05,0x07,0x05,0x07,0x04,0x04,0x05,0x82,0x04,0x0b,0x06,0x05,0x03,0x06,0x03,0x03,0x04,0x03,0x06,0x05,0x05,0x06,0x85,0x04,0x04,0x06,0x05,0x07,0x05,0x05,0x8e,0x04,0x03,0x05,0x06,0x05,0x05,0x86,0x04,0x0b,0x05,0x06,0x03,0x02,0x03,0x06,0x03,0x03,0x07,0x07,0x03,0x07,0x84,0x02,0x01,0x07,0x07,0x84,0x04,0x0b,0x05,0x04,0x04,0x05,0x04,0x05,0x04,0x05,0x05,0x04,0x05,0x06,0x82,0x04,0x00,0x05,0x82,0x00,0x01,0x00,0x05,0x89,0x04,0x01,0x05,
0x05,0x83,0x04,0x0a,0x05,0x05,0x04,0x04,0x06,0x05,0x05,0x03,0x03,0x02,0x05,0x83,0x04,0x02,0x05,0x04,0x04,0x8a,0x05,0x86,0x04,0x83,0x05,0x86,0x04,0x01,0x05,0x05,0x86,0x04,0x03,0x05,0x06,0x05,0x06,0x86,0x04,0x0a,0x05,0x03,0x02,0x07,0x06,0x07,0x07,0x03,0x02,0x03,0x07,0x82,0x02,0x00,0x07,0x82,0x02,0x01,0x07,0x05,0x85,0x04,0x02,0x05,0x04,0x05,0x89,0x04,0x00,0x05,0x82,0x00,0x03,0x00,0x05,0x04,0x05,0x93,0x04,0x04,0x05,0x05,0x03,0x04,0x05,0x8d,0x04,0x01,0x05,0x05,0x88,0x04,0x83,0x05,0x86,0x04,0x01,0x05,0x05,0x86,0x04,0x02,0x05,0x06,0x05,0x87,0x04,0x09,0x05,0x03,0x02,0x06,0x06,0x07,0x03,0x07,0x02,0x03,0x85,0x02,0x02,0x01,0x07,0x07,0x85,0x04,
0x03,0x05,0x04,0x05,0x05,0x8a,0x04,0x82,0x00,0x02,0x00,0x05,0x05,0x96,0x04,0x02,0x05,0x03,0x05,0x98,0x04,0x01,0x05,0x05,0x88,0x04,0x01,0x05,0x05,0x86,0x04,0x05,0x05,0x04,0x05,0x06,0x04,0x07,0x84,0x04,0x09,0x05,0x03,0x02,0x06,0x06,0x07,0x02,0x02,0x07,0x07,0x83,0x02,0x04,0x01,0x02,0x02,0x07,0x07,0x93,0x04,0x00,0x05,0x82,0x00,0x03,0x00,0x00,0x05,0x04,0x91,0x01,0x06,0x00,0x01,0x01,0x04,0x05,0x05,0x06,0x84,0x01,0x03,0x00,0x01,0x04,0x01,0x82,0x00,0x84,0x01,0x06,0x00,0x01,0x00,0x01,0x00,0x01,0x01,0x82,0x05,0x04,0x04,0x01,0x01,0x04,0x00,0x82,0x01,0x02,0x05,0x05,0x04,0x85,0x01,0x08,0x04,0x04,0x05,0x04,0x04,0x00,0x01,0x01,0x00,0x82,0x01,0x09,
0x05,0x03,0x06,0x06,0x03,0x02,0x07,0x07,0x02,0x07,0x86,0x02,0x05,0x07,0x07,0x04,0x01,0x04,0x01,0x86,0x04,0x01,0x01,0x04,0x82,0x01,0x00,0x00,0x82,0x01,0x00,0x05,0x82,0x00,0x82,0x00,0x01,0x05,0x01,0x83,0x00,0x01,0x01,0x00,0x88,0x01,0x85,0x00,0x03,0x04,0x05,0x05,0x01,0x85,0x00,0x01,0x01,0x05,0x8d,0x00,0x00,0x04,0x82,0x05,0x00,0x04,0x83,0x00,0x10,0x01,0x01,0x04,0x05,0x05,0x04,0x00,0x01,0x00,0x01,0x01,0x00,0x01,0x04,0x04,0x05,0x04,0x86,0x00,0x08,0x05,0x03,0x05,0x07,0x07,0x02,0x03,0x02,0x07,0x86,0x02,0x03,0x01,0x07,0x07,0x04,0x85,0x01,0x02,0x04,0x01,0x04,0x84,0x01,0x84,0x00,0x00,0x04,0x82,0x00,0x82,0x00,0x02,0x05,0x05,0x04,0x82,0x01,0x03,
0x00,0x01,0x00,0x00,0x83,0x01,0x00,0x04,0x82,0x01,0x08,0x00,0x01,0x00,0x00,0x01,0x04,0x05,0x05,0x01,0x85,0x00,0x02,0x04,0x05,0x04,0x8b,0x00,0x00,0x04,0x82,0x05,0x01,0x04,0x00,0x83,0x01,0x01,0x00,0x01,0x82,0x05,0x01,0x04,0x00,0x82,0x01,0x06,0x00,0x01,0x00,0x04,0x06,0x05,0x07,0x83,0x00,0x0a,0x01,0x00,0x00,0x04,0x05,0x05,0x07,0x03,0x02,0x03,0x07,0x82,0x02,0x00,0x01,0x83,0x02,0x03,0x01,0x07,0x07,0x04,0x84,0x01,0x00,0x04,0x89,0x01,0x03,0x00,0x01,0x00,0x04,0x82,0x00,0x84,0x00,0x82,0x05,0x8a,0x04,0x03,0x01,0x01,0x00,0x01,0x82,0x00,0x03,0x01,0x05,0x05,0x01,0x85,0x00,0x03,0x01,0x05,0x05,0x01,0x85,0x00,0x03,0x01,0x00,0x01,0x01,0x83,0x05,0x00,
0x04,0x82,0x01,0x00,0x00,0x82,0x01,0x0f,0x04,0x05,0x06,0x07,0x04,0x01,0x01,0x00,0x01,0x01,0x00,0x01,0x06,0x06,0x07,0x04,0x86,0x00,0x06,0x04,0x05,0x03,0x03,0x02,0x07,0x03,0x87,0x02,0x04,0x01,0x07,0x02,0x07,0x04,0x83,0x01,0x03,0x04,0x01,0x04,0x04,0x82,0x05,0x82,0x04,0x00,0x05,0x83,0x04,0x83,0x00,0x8f,0x00,0x82,0x05,0x84,0x01,0x08,0x00,0x01,0x04,0x05,0x05,0x01,0x00,0x01,0x01,0x82,0x00,0x02,0x04,0x05,0x05,0x89,0x04,0x05,0x05,0x05,0x03,0x04,0x05,0x04,0x86,0x01,0x04,0x05,0x03,0x02,0x07,0x04,0x86,0x01,0x0d,0x05,0x06,0x05,0x04,0x01,0x01,0x00,0x01,0x00,0x01,0x01,0x04,0x05,0x04,0x83,0x07,0x89,0x02,0x04,0x07,0x07,0x04,0x01,0x04,0x84,0x01,0x01,
0x04,0x05,0x8d,0x00,0x91,0x00,0x01,0x04,0x04,0x86,0x01,0x04,0x05,0x05,0x01,0x01,0x00,0x82,0x01,0x02,0x00,0x04,0x05,0x86,0x00,0x0b,0x05,0x06,0x05,0x05,0x06,0x04,0x07,0x05,0x05,0x01,0x01,0x04,0x83,0x01,0x05,0x04,0x05,0x03,0x07,0x06,0x04,0x86,0x01,0x05,0x04,0x05,0x07,0x05,0x01,0x00,0x82,0x01,0x04,0x00,0x01,0x01,0x05,0x05,0x82,0x03,0x89,0x02,0x08,0x01,0x01,0x04,0x04,0x01,0x01,0x04,0x04,0x01,0x82,0x04,0x8e,0x00,0x91,0x00,0x01,0x05,0x05,0x85,0x01,0x03,0x04,0x05,0x05,0x04,0x85,0x01,0x00,0x04,0x87,0x00,0x08,0x05,0x03,0x03,0x06,0x03,0x06,0x06,0x05,0x04,0x82,0x01,0x06,0x04,0x01,0x01,0x04,0x05,0x04,0x03,0x83,0x04,0x85,0x01,0x04,0x05,0x03,0x04,
0x05,0x02,0x85,0x01,0x82,0x04,0x04,0x05,0x03,0x02,0x03,0x03,0x85,0x02,0x05,0x07,0x02,0x02,0x07,0x07,0x04,0x82,0x01,0x04,0x04,0x01,0x04,0x01,0x05,0x8e,0x00,0x91,0x00,0x0a,0x05,0x04,0x04,0x01,0x04,0x01,0x04,0x01,0x04,0x05,0x05,0x86,0x01,0x00,0x04,0x88,0x00,0x06,0x06,0x03,0x02,0x03,0x06,0x05,0x05,0x83,0x04,0x0f,0x01,0x01,0x04,0x04,0x05,0x03,0x06,0x04,0x05,0x04,0x01,0x04,0x01,0x04,0x01,0x01,0x83,0x04,0x01,0x05,0x04,0x82,0x01,0x05,0x04,0x01,0x04,0x01,0x01,0x04,0x82,0x05,0x83,0x06,0x02,0x05,0x06,0x07,0x83,0x06,0x01,0x05,0x05,0x86,0x04,0x02,0x01,0x04,0x05,0x8d,0x00,0x02,0x00,0x04,0x06,0x82,0x05,0x04,0x04,0x06,0x05,0x04,0x06,0x82,0x05,0x10,
0x04,0x05,0x04,0x05,0x04,0x04,0x01,0x04,0x04,0x01,0x04,0x01,0x04,0x05,0x05,0x04,0x04,0x82,0x01,0x02,0x04,0x01,0x04,0x89,0x00,0x02,0x03,0x03,0x06,0x82,0x05,0x83,0x04,0x00,0x01,0x82,0x04,0x82,0x05,0x06,0x04,0x05,0x04,0x01,0x04,0x01,0x01,0x83,0x04,0x07,0x03,0x07,0x07,0x05,0x04,0x04,0x01,0x04,0x82,0x01,0x82,0x04,0x00,0x06,0x85,0x04,0x10,0x07,0x06,0x04,0x04,0x06,0x04,0x04,0x05,0x04,0x01,0x04,0x03,0x04,0x01,0x04,0x04,0x05,0x8c,0x04,0x01,0x00,0x00,0x00,0x05,0x95,0x04,0x08,0x03,0x01,0x04,0x04,0x05,0x05,0x01,0x04,0x01,0x84,0x04,0x89,0x00,0x06,0x06,0x03,0x07,0x05,0x05,0x04,0x05,0x92,0x04,0x09,0x01,0x04,0x04,0x02,0x07,0x05,0x04,0x01,0x04,0x01,
0x84,0x04,0x00,0x03,0x8d,0x04,0x00,0x05,0x8c,0x04,0x00,0x06,0x87,0x04,0x01,0x05,0x00,0x00,0x05,0x98,0x04,0x82,0x05,0x85,0x04,0x01,0x01,0x04,0x8a,0x00,0x01,0x03,0x06,0x82,0x05,0x94,0x04,0x05,0x05,0x03,0x02,0x07,0x07,0x05,0x82,0x04,0x00,0x02,0x8a,0x04,0x00,0x03,0x86,0x04,0x00,0x06,0x94,0x04,0x02,0x01,0x05,0x00,0x00,0x05,0x98,0x04,0x82,0x05,0x86,0x04,0x00,0x05,0x8a,0x00,0x03,0x06,0x05,0x05,0x06,0x82,0x05,0x82,0x04,0x01,0x05,0x05,0x87,0x04,0x0d,0x03,0x04,0x04,0x01,0x04,0x03,0x05,0x03,0x03,0x02,0x07,0x05,0x05,0x06,0x94,0x04,0x01,0x05,0x06,0x94,0x04,0x01,0x05,0x00,0x00,0x05,0x8a,0x04,0x01,0x06,0x06,0x8a,0x04,0x03,0x05,0x00,0x00,0x05,0x87,
0x04,0x8a,0x00,0x83,0x05,0x02,0x04,0x04,0x05,0x82,0x04,0x01,0x05,0x05,0x8d,0x04,0x07,0x05,0x03,0x03,0x02,0x07,0x07,0x05,0x05,0x84,0x04,0x00,0x06,0x8e,0x04,0x00,0x05,0x87,0x04,0x00,0x06,0x8c,0x04,0x01,0x05,0x00,0x02,0x05,0x05,0x06,0x83,0x04,0x03,0x06,0x04,0x04,0x05,0x83,0x04,0x03,0x06,0x06,0x04,0x05,0x83,0x04,0x01,0x06,0x05,0x82,0x00,0x03,0x05,0x06,0x04,0x06,0x83,0x04,0x00,0x05,0x8a,0x00,0x82,0x05,0x05,0x06,0x05,0x04,0x04,0x06,0x04,0x82,0x05,0x87,0x04,0x00,0x06,0x84,0x04,0x01,0x05,0x06,0x82,0x02,0x00,0x07,0x82,0x05,0x84,0x04,0x00,0x06,0x83,0x04,0x02,0x06,0x04,0x06,0x82,0x04,0x0c,0x06,0x04,0x06,0x04,0x05,0x05,0x04,0x05,0x04,0x04,0x06,
0x04,0x05,0x82,0x04,0x04,0x06,0x04,0x05,0x04,0x06,0x82,0x04,0x04,0x06,0x04,0x04,0x05,0x00,0x02,0x05,0x04,0x06,0x82,0x04,0x00,0x06,0x82,0x04,0x00,0x06,0x82,0x04,0x00,0x06,0x82,0x04,0x05,0x06,0x04,0x04,0x06,0x05,0x05,0x83,0x00,0x02,0x05,0x04,0x06,0x82,0x04,0x02,0x06,0x04,0x05,0x8a,0x00,0x04,0x05,0x06,0x05,0x05,0x04,0x82,0x06,0x19,0x05,0x05,0x06,0x06,0x05,0x04,0x06,0x06,0x04,0x04,0x05,0x04,0x06,0x06,0x04,0x04,0x06,0x04,0x05,0x03,0x03,0x02,0x03,0x07,0x06,0x06,0x84,0x05,0x0c,0x06,0x06,0x04,0x05,0x04,0x04,0x06,0x04,0x04,0x05,0x04,0x04,0x05,0x82,0x04,0x18,0x05,0x05,0x04,0x04,0x06,0x04,0x05,0x04,0x06,0x04,0x04,0x06,0x04,0x04,0x06,0x04,0x04,
0x05,0x04,0x04,0x06,0x04,0x04,0x05,0x00,0x95,0x05,0x85,0x00,0x84,0x05,0x00,0x06,0x82,0x05,0x89,0x00,0x89,0x05,0x02,0x06,0x03,0x07,0x82,0x05,0x02,0x06,0x05,0x04,0x88,0x05,0x04,0x03,0x02,0x07,0x03,0x06,0x82,0x07,0x00,0x00,0x87,0x05,0x00,0x06,0x84,0x05,0x00,0x06,0x87,0x05,0x01,0x06,0x04,0x86,0x05,0x00,0x06,0x89,0x05,0x00,0x00,0xb2,0x00,0x85,0x05,0x03,0x03,0x02,0x02,0x06,0x8d,0x05,0x06,0x03,0x02,0x02,0x06,0x06,0x02,0x03,0xad,0x00,0xb3,0x00,0x03,0x06,0x03,0x06,0x06,0x84,0x02,0x05,0x07,0x03,0x02,0x07,0x02,0x04,0x82,0x02,0x03,0x03,0x02,0x02,0x04,0x82,0x02,0x04,0x07,0x06,0x03,0x03,0x07,0xad,0x00,0xb3,0x00,0x00,0x06,0x83,0x03,0x06,0x02,0x01,
0x02,0x02,0x01,0x02,0x01,0x84,0x02,0x00,0x01,0x85,0x02,0x04,0x07,0x06,0x06,0x03,0x03,0xae,0x00,0xb4,0x00,0x00,0x06,0x82,0x03,0x86,0x02,0x02,0x01,0x02,0x01,0x87,0x02,0x04,0x03,0x03,0x06,0x07,0x02,0xaf,0x00,0xb4,0x00,0x00,0x06,0x82,0x03,0x03,0x02,0x01,0x02,0x01,0x87,0x02,0x00,0x01,0x85,0x02,0x03,0x07,0x06,0x02,0x03,0xaf,0x00,0xb5,0x00,0x83,0x03,0x83,0x02,0x05,0x01,0x02,0x02,0x01,0x02,0x01,0x86,0x02,0x03,0x03,0x06,0x03,0x07,0xb0,0x00,0xb5,0x00,0x00,0x05,0x82,0x03,0x8e,0x02,0x04,0x03,0x07,0x06,0x06,0x03,0xb1,0x00,0xb5,0x00,0x01,0x06,0x05,0x82,0x03,0x04,0x07,0x07,0x02,0x07,0x07,0x85,0x02,0x83,0x07,0x03,0x06,0x06,0x03,0x07,0xb1,0x00,0xa7,
0x00,0x85,0x05,0x84,0x00,0x84,0x05,0x03,0x06,0x07,0x07,0x06,0x84,0x05,0x04,0x06,0x07,0x02,0x03,0x02,0x85,0x05,0x02,0x07,0x06,0x06,0x85,0x05,0x83,0x00,0x82,0x05,0xa3,0x00,0xa7,0x00,0x86,0x05,0x82,0x00,0x85,0x05,0x82,0x06,0x86,0x05,0x03,0x07,0x02,0x07,0x06,0x85,0x05,0x01,0x06,0x07,0x86,0x05,0x82,0x00,0x84,0x05,0xa2,0x00,0xa7,0x00,0x86,0x05,0x82,0x00,0x86,0x05,0x01,0x06,0x07,0x86,0x05,0x02,0x06,0x07,0x07,0x86,0x05,0x01,0x06,0x00,0x86,0x05,0x01,0x00,0x00,0x86,0x05,0xa1,0x00,0xa7,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x06,0x06,0x82,0x05,0x00,0x00,0x82,0x05,0x02,0x07,0x03,0x07,0x82,
0x05,0x00,0x00,0x82,0x05,0x83,0x00,0x82,0x05,0x83,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0xa1,0x00,0xa6,0x00,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x82,0x00,0x82,0x05,0x05,0x00,0x00,0x05,0x05,0x06,0x06,0x83,0x05,0x00,0x00,0x82,0x05,0x06,0x07,0x07,0x06,0x05,0x05,0x00,0x00,0x82,0x05,0x83,0x00,0x82,0x05,0x83,0x00,0x05,0x05,0x05,0x00,0x00,0x05,0x05,0xa2,0x00,0xa6,0x00,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x82,0x00,0x82,0x05,0x05,0x00,0x00,0x05,0x05,0x06,0x07,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x07,0x02,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x83,0x00,0x01,0x05,0x05,0x83,0x00,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0xa2,0x00,0xa6,0x00,0x82,0x05,
0x03,0x00,0x00,0x05,0x05,0x82,0x00,0x82,0x05,0x00,0x00,0x83,0x05,0x05,0x06,0x06,0x05,0x05,0x00,0x00,0x82,0x05,0x06,0x07,0x02,0x06,0x05,0x05,0x00,0x00,0x82,0x05,0x83,0x00,0x01,0x05,0x05,0x83,0x00,0x82,0x05,0xa6,0x00,0xa6,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x03,0x02,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x83,0x00,0x01,0x05,0x05,0x84,0x00,0x82,0x05,0xa5,0x00,0xa6,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x86,0x05,0x02,0x06,0x02,0x07,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x82,0x00,0x82,0x05,0x84,
0x00,0x82,0x05,0xa5,0x00,0xa6,0x00,0x86,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x86,0x05,0x82,0x07,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x83,0x00,0x82,0x05,0x85,0x00,0x82,0x05,0xa4,0x00,0xa6,0x00,0x85,0x05,0x82,0x00,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x86,0x05,0x02,0x03,0x02,0x07,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x83,0x00,0x82,0x05,0x86,0x00,0x82,0x05,0xa3,0x00,0xa6,0x00,0x85,0x05,0x82,0x00,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x82,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x02,0x07,0x07,0x06,0x82,0x05,0x00,0x00,0x82,0x05,0x83,0x00,0x82,0x05,0x86,0x00,0x82,0x05,0xa3,0x00,0xa5,0x00,0x82,0x05,0x02,
0x00,0x05,0x05,0x83,0x00,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x82,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x01,0x06,0x07,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x83,0x00,0x82,0x05,0x87,0x00,0x01,0x05,0x05,0xa3,0x00,0xa5,0x00,0x82,0x05,0x02,0x00,0x05,0x05,0x83,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x01,0x07,0x06,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x83,0x00,0x01,0x05,0x05,0x88,0x00,0x01,0x05,0x05,0xa3,0x00,0xa5,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x01,0x07,0x06,0x82,0x05,0x01,0x00,0x00,0x82,0x05,0x83,0x00,0x01,0x05,
0x05,0x83,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0xa3,0x00,0xa5,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x01,0x06,0x06,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x83,0x00,0x82,0x05,0x83,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0xa3,0x00,0xa5,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0x01,0x00,0x00,0x88,0x05,0x00,0x07,0x82,0x05,0x03,0x00,0x00,0x05,0x05,0x83,0x00,0x82,0x05,0x83,0x00,0x82,0x05,0x00,0x00,0x82,0x05,0xa3,0x00,0xa5,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x85,0x05,0x82,0x00,0x87,0x05,0x01,0x00,0x00,0x86,
0x05,0x83,0x00,0x82,0x05,0x83,0x00,0x85,0x05,0xa4,0x00,0xa5,0x00,0x03,0x05,0x05,0x00,0x00,0x82,0x05,0x82,0x00,0x85,0x05,0x82,0x00,0x85,0x05,0x84,0x00,0x84,0x05,0x84,0x00,0x82,0x05,0x83,0x00,0x85,0x05,0xa4,0x00,0xb1,0x00,0x01,0x05,0x05,0x90,0x00,0x01,0x05,0x05,0x8f,0x00,0x01,0x05,0x05,0xa6,0x00,0xff,0x00,0xff,0x00
0x00,0x01,0x09,0x00,0x00,0x08,0x00,0x18,0x00,0x00,0x00,0x00,0xc0,0x00,0x8b,0x00,0x08,0x00,0x00,0x00,0x00,0x32,0x29,0x2e,0x66,0x3b,0x4d,0x9f,0x42,0x57,0xc5,0x54,0xbe,0xe6,0xe4,0xe3,0xbe,0xab,0xb4,0xc1,0x9c,0x67,0xff,0x00,0xbf,0x00,0xff,0x00,0xbf,0x00,0xfc,0x00,0x01,0x04,0x04,0xc0,0x00,0xfb,0x00,0x82,0x04,0xc0,0x00,0xfb,0x00,0x82,0x04,0xc0,0x00,0xfa,0x00,0x82,0x04,0xc1,0x00,0xfa,0x00,0x82,0x04,0xc1,0x00,0xf9,0x00,0x82,0x04,0xc2,0x00,0xf8,0x00,0x82,0x04,0xc3,0x00,0xf8,0x00,0x82,0x04,0xc3,0x00,0xcd,0x00,0x03,0x04,0x04,0x00,0x00,0x83,0x04,0xa2,0x00,0x01,0x04,0x04,0xc4,0x00,0xcc,0x00,0x89,0x04,0xa0,0x00,0x82,0x04,0xc4,0x00,0xcc,0x00,0x89,
0x04,0xa0,0x00,0x01,0x04,0x04,0xc5,0x00,0xcb,0x00,0x84,0x04,0x82,0x01,0x83,0x04,0x9e,0x00,0x82,0x04,0xc5,0x00,0xca,0x00,0x84,0x04,0x83,0x01,0x02,0x06,0x04,0x04,0x9f,0x00,0x01,0x04,0x04,0xc6,0x00,0xca,0x00,0x83,0x04,0x84,0x02,0x02,0x06,0x04,0x04,0x9e,0x00,0x82,0x04,0xc6,0x00,0xc9,0x00,0x83,0x04,0x02,0x02,0x02,0x03,0x82,0x04,0x01,0x06,0x04,0x9f,0x00,0x01,0x04,0x04,0xc7,0x00,0xc9,0x00,0x82,0x04,0x01,0x02,0x01,0x82,0x02,0x00,0x03,0x82,0x04,0x9a,0x00,0x01,0x04,0x04,0x82,0x00,0x01,0x04,0x04,0xc7,0x00,0xc8,0x00,0x83,0x04,0x04,0x01,0x02,0x02,0x03,0x03,0x82,0x04,0x99,0x00,0x83,0x04,0x03,0x00,0x00,0x04,0x04,0xc8,0x00,0xc8,0x00,0x82,0x04,0x01,
0x02,0x02,0x82,0x03,0x01,0x04,0x04,0x8d,0x00,0x00,0x04,0x8b,0x00,0x88,0x04,0xc8,0x00,0xc7,0x00,0x83,0x04,0x01,0x02,0x03,0x83,0x04,0x8d,0x00,0x82,0x04,0x8a,0x00,0x87,0x04,0xc9,0x00,0xc7,0x00,0x82,0x04,0x01,0x02,0x03,0x85,0x04,0x8b,0x00,0x83,0x04,0x89,0x00,0x83,0x04,0x00,0x03,0x83,0x04,0xc9,0x00,0xc6,0x00,0x82,0x04,0x01,0x03,0x02,0x8b,0x04,0x85,0x00,0x84,0x04,0x03,0x00,0x00,0x04,0x04,0x84,0x00,0x84,0x04,0x03,0x02,0x06,0x04,0x04,0x87,0x00,0x00,0x04,0xc1,0x00,0xa2,0x00,0x8d,0x05,0x82,0x04,0x8a,0x05,0x05,0x00,0x00,0x05,0x05,0x00,0x00,0x84,0x04,0x02,0x03,0x06,0x06,0x8b,0x04,0x02,0x05,0x05,0x06,0x8b,0x04,0x02,0x06,0x05,0x06,0x84,0x04,0x04,
0x02,0x03,0x05,0x04,0x04,0x83,0x00,0x01,0x05,0x05,0x82,0x04,0xa2,0x05,0x9e,0x00,0xa1,0x00,0x01,0x05,0x06,0xa5,0x04,0x00,0x06,0x8e,0x04,0x01,0x06,0x06,0x84,0x04,0x01,0x02,0x06,0x85,0x04,0x00,0x06,0x85,0x04,0x03,0x02,0x04,0x06,0x04,0x85,0x00,0x04,0x05,0x04,0x04,0x03,0x07,0x9b,0x06,0x00,0x07,0x83,0x06,0x01,0x05,0x05,0x9d,0x00,0xa2,0x00,0x00,0x06,0x95,0x04,0x00,0x03,0x83,0x04,0x04,0x03,0x04,0x04,0x03,0x03,0x8a,0x04,0x04,0x03,0x02,0x01,0x01,0x02,0x84,0x04,0x00,0x03,0x85,0x04,0x02,0x02,0x02,0x06,0x84,0x04,0x00,0x03,0x85,0x04,0x01,0x02,0x03,0x82,0x04,0x86,0x00,0x02,0x04,0x03,0x02,0x98,0x03,0x02,0x07,0x07,0x03,0x85,0x07,0x00,0x06,0x9e,0x00,
0xa3,0x00,0x02,0x04,0x04,0x03,0x83,0x02,0x03,0x03,0x02,0x03,0x04,0x82,0x02,0x83,0x04,0x00,0x03,0x8c,0x02,0x87,0x04,0x00,0x02,0x86,0x01,0x83,0x04,0x01,0x03,0x03,0x85,0x04,0x02,0x01,0x02,0x05,0x83,0x04,0x00,0x02,0x85,0x04,0x02,0x03,0x01,0x03,0x82,0x04,0x85,0x00,0x06,0x04,0x04,0x01,0x01,0x02,0x02,0x03,0x91,0x02,0x06,0x03,0x03,0x02,0x03,0x03,0x02,0x02,0x83,0x03,0x02,0x07,0x06,0x05,0x9e,0x00,0xa3,0x00,0x02,0x05,0x04,0x04,0x83,0x02,0x03,0x01,0x01,0x02,0x04,0x82,0x02,0x00,0x03,0x82,0x04,0x8c,0x02,0x00,0x03,0x85,0x04,0x00,0x03,0x85,0x01,0x03,0x02,0x02,0x03,0x05,0x82,0x04,0x00,0x02,0x85,0x04,0x01,0x02,0x01,0x85,0x04,0x00,0x02,0x85,0x04,0x01,
0x01,0x02,0x82,0x04,0x86,0x00,0x02,0x04,0x02,0x01,0x8b,0x02,0x01,0x03,0x03,0x87,0x02,0x03,0x03,0x03,0x02,0x03,0x84,0x02,0x03,0x03,0x03,0x06,0x05,0x9f,0x00,0xa4,0x00,0x02,0x04,0x04,0x02,0x82,0x01,0x82,0x02,0x04,0x03,0x04,0x02,0x02,0x03,0x82,0x04,0x8c,0x02,0x85,0x04,0x84,0x01,0x83,0x02,0x02,0x03,0x05,0x06,0x82,0x04,0x00,0x02,0x84,0x04,0x02,0x03,0x01,0x02,0x84,0x04,0x00,0x02,0x85,0x04,0x02,0x03,0x01,0x03,0x82,0x04,0x85,0x00,0x02,0x04,0x03,0x01,0x8c,0x02,0x01,0x03,0x03,0x86,0x02,0x01,0x03,0x07,0x82,0x03,0x84,0x02,0x02,0x03,0x07,0x06,0xa0,0x00,0xa4,0x00,0x04,0x05,0x04,0x04,0x02,0x01,0x84,0x02,0x07,0x04,0x03,0x02,0x02,0x03,0x04,0x04,0x03,
0x8b,0x02,0x83,0x04,0x00,0x02,0x83,0x01,0x85,0x02,0x84,0x04,0x01,0x01,0x02,0x84,0x04,0x01,0x02,0x01,0x85,0x04,0x00,0x03,0x85,0x04,0x01,0x02,0x02,0x83,0x04,0x85,0x00,0x02,0x04,0x01,0x01,0x84,0x02,0x00,0x03,0x88,0x02,0x00,0x03,0x85,0x02,0x00,0x03,0x87,0x02,0x03,0x03,0x03,0x06,0x05,0xa0,0x00,0xa5,0x00,0x02,0x04,0x04,0x03,0x84,0x02,0x05,0x01,0x03,0x04,0x02,0x02,0x03,0x82,0x04,0x8a,0x02,0x00,0x03,0x83,0x04,0x82,0x01,0x83,0x02,0x00,0x03,0x82,0x02,0x00,0x06,0x82,0x04,0x01,0x02,0x01,0x84,0x04,0x02,0x03,0x01,0x03,0x84,0x04,0x01,0x03,0x06,0x85,0x04,0x00,0x02,0x84,0x04,0x84,0x00,0x02,0x04,0x02,0x01,0x85,0x02,0x02,0x03,0x06,0x03,0x8d,0x02,0x03,
0x03,0x02,0x02,0x03,0x83,0x02,0x03,0x03,0x03,0x07,0x06,0xa1,0x00,0xa6,0x00,0x01,0x04,0x04,0x86,0x02,0x03,0x04,0x03,0x02,0x02,0x82,0x04,0x00,0x03,0x89,0x02,0x83,0x04,0x02,0x02,0x01,0x01,0x87,0x02,0x83,0x04,0x02,0x03,0x01,0x01,0x84,0x04,0x02,0x02,0x02,0x06,0x87,0x04,0x00,0x03,0x88,0x04,0x84,0x00,0x03,0x04,0x04,0x01,0x01,0x85,0x02,0x03,0x07,0x05,0x06,0x03,0x8b,0x02,0x03,0x03,0x02,0x02,0x03,0x84,0x02,0x03,0x03,0x07,0x06,0x05,0xa1,0x00,0xa6,0x00,0x02,0x05,0x04,0x03,0x85,0x02,0x04,0x03,0x04,0x02,0x02,0x03,0x82,0x04,0x89,0x02,0x83,0x04,0x89,0x02,0x83,0x04,0x03,0x03,0x01,0x01,0x02,0x84,0x04,0x00,0x02,0x88,0x04,0x01,0x02,0x02,0x85,0x04,0x02,
0x02,0x06,0x04,0x84,0x00,0x02,0x04,0x01,0x01,0x86,0x02,0x02,0x07,0x06,0x07,0x8c,0x02,0x03,0x03,0x02,0x02,0x07,0x84,0x02,0x02,0x03,0x06,0x05,0xa2,0x00,0xa7,0x00,0x04,0x04,0x04,0x03,0x06,0x03,0x83,0x02,0x00,0x04,0x82,0x02,0x82,0x04,0x00,0x03,0x87,0x02,0x00,0x03,0x82,0x04,0x01,0x03,0x01,0x87,0x02,0x84,0x04,0x03,0x01,0x01,0x02,0x02,0x87,0x04,0x00,0x02,0x84,0x04,0x03,0x03,0x01,0x01,0x03,0x82,0x04,0x04,0x03,0x02,0x01,0x06,0x04,0x83,0x00,0x02,0x04,0x02,0x01,0x87,0x02,0x82,0x03,0x8b,0x02,0x0b,0x03,0x02,0x02,0x03,0x02,0x02,0x01,0x02,0x02,0x03,0x07,0x06,0xa3,0x00,0xa7,0x00,0x03,0x05,0x04,0x04,0x03,0x84,0x02,0x07,0x03,0x04,0x02,0x02,0x03,0x04,
0x04,0x03,0x87,0x02,0x83,0x04,0x88,0x02,0x84,0x04,0x01,0x01,0x01,0x82,0x02,0x86,0x04,0x01,0x02,0x01,0x84,0x04,0x83,0x01,0x82,0x02,0x0b,0x01,0x01,0x02,0x06,0x04,0x04,0x00,0x00,0x04,0x03,0x01,0x01,0x88,0x02,0x01,0x03,0x03,0x87,0x02,0x07,0x03,0x02,0x02,0x03,0x03,0x02,0x02,0x03,0x83,0x02,0x03,0x03,0x03,0x06,0x05,0xa3,0x00,0xa8,0x00,0x02,0x06,0x04,0x03,0x85,0x02,0x03,0x04,0x03,0x02,0x03,0x82,0x04,0x00,0x03,0x86,0x02,0x83,0x04,0x87,0x02,0x84,0x04,0x01,0x01,0x01,0x84,0x02,0x84,0x04,0x00,0x02,0x82,0x01,0x82,0x04,0x03,0x01,0x01,0x02,0x02,0x85,0x01,0x00,0x02,0x82,0x04,0x04,0x00,0x04,0x04,0x01,0x01,0x96,0x02,0x03,0x03,0x02,0x02,0x03,0x84,0x02,
0x02,0x03,0x07,0x05,0xa4,0x00,0xa8,0x00,0x02,0x05,0x04,0x04,0x85,0x02,0x03,0x04,0x04,0x02,0x02,0x82,0x04,0x00,0x03,0x85,0x02,0x00,0x03,0x82,0x04,0x00,0x03,0x85,0x02,0x00,0x03,0x83,0x04,0x02,0x03,0x01,0x01,0x84,0x02,0x04,0x01,0x03,0x04,0x04,0x03,0x82,0x01,0x03,0x02,0x01,0x01,0x02,0x82,0x01,0x82,0x02,0x83,0x01,0x82,0x02,0x00,0x03,0x82,0x04,0x01,0x02,0x01,0x96,0x02,0x04,0x03,0x03,0x02,0x02,0x03,0x82,0x02,0x04,0x03,0x03,0x07,0x06,0x05,0xa4,0x00,0xa9,0x00,0x02,0x05,0x04,0x03,0x84,0x02,0x04,0x03,0x04,0x03,0x02,0x03,0x82,0x04,0x00,0x03,0x84,0x02,0x83,0x04,0x84,0x02,0x00,0x03,0x84,0x04,0x02,0x02,0x01,0x01,0x86,0x02,0x01,0x01,0x02,0x82,0x01,
0x83,0x02,0x82,0x01,0x8a,0x02,0x86,0x01,0x96,0x02,0x04,0x03,0x03,0x02,0x03,0x03,0x82,0x02,0x03,0x03,0x03,0x06,0x05,0xa5,0x00,0xaa,0x00,0x03,0x06,0x04,0x03,0x03,0x83,0x02,0x03,0x04,0x04,0x02,0x03,0x82,0x04,0x00,0x03,0x83,0x02,0x00,0x03,0x83,0x04,0x82,0x02,0x01,0x03,0x03,0x84,0x04,0x02,0x02,0x01,0x01,0x87,0x02,0x84,0x01,0x84,0x02,0x01,0x01,0x01,0x8b,0x02,0x84,0x01,0x01,0x02,0x02,0x83,0x03,0x88,0x02,0x00,0x03,0x87,0x02,0x03,0x03,0x02,0x03,0x03,0x82,0x02,0x04,0x03,0x03,0x07,0x05,0x05,0xa5,0x00,0xaa,0x00,0x03,0x05,0x04,0x04,0x03,0x83,0x02,0x03,0x03,0x04,0x03,0x02,0x83,0x04,0x00,0x03,0x82,0x02,0x00,0x03,0x83,0x04,0x01,0x02,0x03,0x85,0x04,
0x00,0x02,0x82,0x01,0x03,0x02,0x02,0x03,0x03,0x86,0x02,0x00,0x01,0x8f,0x02,0x01,0x03,0x03,0x84,0x02,0x00,0x01,0x82,0x02,0x03,0x03,0x06,0x03,0x03,0x91,0x02,0x0b,0x03,0x03,0x02,0x03,0x03,0x02,0x02,0x03,0x03,0x07,0x06,0x05,0xa6,0x00,0xab,0x00,0x02,0x05,0x04,0x03,0x83,0x02,0x00,0x03,0x86,0x04,0x03,0x03,0x03,0x02,0x03,0x8a,0x04,0x00,0x03,0x82,0x01,0x83,0x02,0x03,0x03,0x03,0x02,0x02,0x82,0x03,0x84,0x02,0x00,0x03,0x8c,0x02,0x00,0x03,0x82,0x02,0x07,0x03,0x03,0x07,0x03,0x02,0x02,0x03,0x02,0x82,0x03,0x90,0x02,0x06,0x03,0x03,0x02,0x02,0x03,0x02,0x02,0x82,0x03,0x01,0x07,0x05,0xa7,0x00,0xab,0x00,0x0a,0x05,0x04,0x04,0x03,0x02,0x03,0x03,0x02,0x03,
0x04,0x06,0x84,0x04,0x02,0x03,0x02,0x03,0x88,0x04,0x01,0x03,0x02,0x82,0x01,0x01,0x02,0x02,0x8f,0x03,0x08,0x02,0x03,0x02,0x02,0x03,0x02,0x03,0x03,0x02,0x87,0x03,0x04,0x02,0x02,0x03,0x03,0x02,0x82,0x03,0x02,0x02,0x03,0x03,0x8b,0x02,0x02,0x03,0x02,0x02,0x83,0x03,0x03,0x02,0x03,0x03,0x02,0x82,0x03,0x02,0x07,0x06,0x05,0xa7,0x00,0xac,0x00,0x0a,0x05,0x04,0x04,0x02,0x02,0x03,0x02,0x03,0x04,0x04,0x03,0x84,0x04,0x00,0x03,0x83,0x04,0x84,0x02,0x83,0x01,0x01,0x02,0x02,0x8f,0x03,0x00,0x02,0x98,0x03,0x02,0x02,0x03,0x02,0x82,0x03,0x83,0x02,0x01,0x03,0x03,0x86,0x02,0x89,0x03,0x02,0x07,0x06,0x05,0xa8,0x00,0xad,0x00,0x01,0x06,0x04,0x83,0x03,0x04,0x02,
0x03,0x04,0x03,0x03,0x83,0x04,0x00,0x03,0x83,0x04,0x00,0x02,0x85,0x01,0x01,0x02,0x02,0xa4,0x03,0x00,0x02,0x89,0x03,0x01,0x02,0x02,0x85,0x03,0x04,0x02,0x03,0x02,0x03,0x03,0x82,0x02,0x88,0x03,0x02,0x07,0x05,0x05,0xa8,0x00,0xad,0x00,0x02,0x05,0x04,0x04,0x84,0x03,0x02,0x04,0x04,0x03,0x88,0x04,0x86,0x02,0xc9,0x03,0x02,0x07,0x06,0x05,0xa9,0x00,0xad,0x00,0x03,0x05,0x05,0x04,0x04,0x83,0x03,0x02,0x04,0x04,0x03,0x87,0x04,0x01,0x02,0x02,0xc9,0x03,0x00,0x07,0x84,0x03,0x02,0x06,0x05,0x06,0xa9,0x00,0xae,0x00,0x00,0x05,0x84,0x04,0x00,0x03,0x87,0x04,0x09,0x03,0x04,0x03,0x02,0x03,0x04,0x04,0x03,0x03,0x04,0x9a,0x03,0x03,0x04,0x03,0x03,0x04,0x9f,0x03,
0x02,0x04,0x03,0x03,0x83,0x04,0x83,0x03,0x03,0x07,0x05,0x05,0x06,0xa9,0x00,0xad,0x00,0x8e,0x05,0x00,0x06,0x82,0x02,0x00,0x06,0x85,0x05,0x00,0x06,0x82,0x04,0x93,0x03,0x00,0x06,0x8d,0x05,0x02,0x06,0x04,0x04,0x8e,0x03,0x03,0x07,0x04,0x06,0x06,0x91,0x05,0xa8,0x00,0x8a,0x00,0xb2,0x05,0x02,0x06,0x02,0x07,0x89,0x05,0x82,0x04,0x8f,0x03,0x01,0x07,0x07,0x90,0x05,0x01,0x04,0x04,0x8a,0x03,0x01,0x07,0x06,0xbf,0x05,0x87,0x00,0x82,0x05,0x01,0x06,0x06,0x98,0x05,0x01,0x06,0x06,0x83,0x05,0x00,0x06,0x90,0x05,0x82,0x06,0x84,0x05,0x00,0x06,0x85,0x05,0x82,0x04,0x8d,0x03,0x04,0x07,0x05,0x05,0x06,0x06,0x8d,0x05,0x01,0x04,0x04,0x88,0x03,0x01,0x07,0x06,0x85,
0x05,0x83,0x06,0x02,0x05,0x06,0x06,0x8c,0x05,0x01,0x06,0x06,0x82,0x05,0x00,0x06,0x9e,0x05,0x02,0x06,0x06,0x05,0x85,0x00,0x82,0x05,0x00,0x06,0xa1,0x05,0x00,0x06,0x9c,0x05,0x00,0x06,0x82,0x05,0x82,0x04,0x8b,0x03,0x04,0x07,0x06,0x05,0x05,0x06,0x8e,0x05,0x01,0x04,0x04,0x86,0x03,0x01,0x07,0x07,0x83,0x05,0x01,0x06,0x06,0x96,0x05,0x00,0x06,0x82,0x05,0x00,0x06,0xa0,0x05,0x00,0x00,0x83,0x00,0x82,0x05,0x00,0x06,0x9d,0x05,0x00,0x06,0x84,0x05,0x00,0x06,0x9d,0x05,0x00,0x06,0x82,0x05,0x82,0x04,0x89,0x03,0x04,0x07,0x07,0x05,0x05,0x06,0x8f,0x05,0x01,0x04,0x04,0x85,0x03,0x01,0x07,0x07,0x82,0x05,0x01,0x06,0x06,0x97,0x05,0x00,0x06,0x83,0x05,0x00,0x06,
0x8e,0x05,0x03,0x06,0x05,0x05,0x06,0x82,0x05,0x00,0x06,0x87,0x05,0x02,0x06,0x05,0x00,0x82,0x00,0x82,0x05,0x00,0x06,0x9d,0x05,0x00,0x06,0x82,0x05,0x03,0x06,0x05,0x05,0x06,0x9e,0x05,0x03,0x06,0x06,0x05,0x05,0x82,0x04,0x88,0x03,0x00,0x07,0x82,0x05,0x00,0x06,0x8f,0x05,0x01,0x04,0x04,0x84,0x03,0x01,0x07,0x06,0x82,0x05,0x00,0x06,0x99,0x05,0x00,0x06,0x83,0x05,0x00,0x06,0x8b,0x05,0x00,0x06,0x82,0x05,0x03,0x06,0x05,0x05,0x06,0x89,0x05,0x03,0x06,0x06,0x05,0x00,0x82,0x00,0x02,0x05,0x05,0x06,0x9e,0x05,0x07,0x06,0x05,0x05,0x04,0x06,0x05,0x05,0x06,0x9f,0x05,0x00,0x06,0x82,0x05,0x01,0x04,0x04,0x87,0x03,0x04,0x07,0x07,0x05,0x05,0x06,0x90,0x05,0x01,
0x04,0x04,0x83,0x03,0x01,0x07,0x06,0x9d,0x05,0x00,0x06,0x84,0x05,0x00,0x06,0x8d,0x05,0x05,0x06,0x06,0x05,0x06,0x06,0x05,0x86,0x06,0x82,0x05,0x03,0x06,0x05,0x00,0x00,0x07,0x00,0x00,0x05,0x05,0x06,0x05,0x05,0x06,0x9b,0x05,0x08,0x06,0x05,0x05,0x04,0x04,0x06,0x05,0x05,0x06,0xa0,0x05,0x02,0x06,0x05,0x05,0x82,0x04,0x86,0x03,0x00,0x07,0x82,0x05,0x00,0x06,0x90,0x05,0x01,0x04,0x04,0x82,0x03,0x01,0x07,0x07,0x9d,0x05,0x01,0x06,0x06,0x84,0x05,0x00,0x06,0x89,0x05,0x02,0x06,0x05,0x05,0x8b,0x06,0x08,0x05,0x06,0x05,0x05,0x06,0x06,0x05,0x00,0x00,0x02,0x00,0x00,0x05,0x82,0x06,0x01,0x05,0x06,0x9b,0x05,0x04,0x06,0x05,0x05,0x04,0x04,0x82,0x05,0x00,0x06,
0xa1,0x05,0x04,0x06,0x05,0x05,0x04,0x04,0x85,0x03,0x04,0x07,0x07,0x05,0x05,0x06,0x91,0x05,0x05,0x04,0x04,0x03,0x03,0x07,0x07,0x9e,0x05,0x00,0x06,0x85,0x05,0x00,0x06,0x8a,0x05,0x02,0x06,0x06,0x05,0x8a,0x06,0x01,0x05,0x05,0x82,0x06,0x00,0x05,0x82,0x00,0x02,0x00,0x05,0x05,0x85,0x06,0x99,0x05,0x09,0x06,0x05,0x05,0x06,0x04,0x04,0x06,0x05,0x05,0x06,0xa1,0x05,0x02,0x06,0x05,0x05,0x82,0x04,0x84,0x03,0x04,0x07,0x05,0x05,0x06,0x06,0x91,0x05,0x04,0x04,0x04,0x03,0x07,0x07,0x82,0x05,0x00,0x06,0x9b,0x05,0x07,0x06,0x05,0x05,0x06,0x06,0x05,0x05,0x06,0x87,0x05,0x01,0x06,0x05,0x90,0x06,0x03,0x05,0x06,0x06,0x05,0x82,0x00,0x02,0x00,0x05,0x05,0x85,0x06,
0x01,0x05,0x06,0x97,0x05,0x02,0x06,0x05,0x05,0x82,0x04,0x03,0x07,0x05,0x05,0x06,0xa2,0x05,0x04,0x06,0x05,0x05,0x04,0x04,0x83,0x03,0x04,0x07,0x07,0x05,0x05,0x06,0x8f,0x05,0x0a,0x06,0x05,0x05,0x04,0x04,0x03,0x07,0x06,0x05,0x05,0x06,0x9b,0x05,0x08,0x06,0x05,0x05,0x06,0x04,0x07,0x05,0x05,0x06,0x8a,0x05,0x91,0x06,0x00,0x05,0x83,0x00,0x01,0x05,0x05,0x88,0x06,0x82,0x05,0x8e,0x06,0x00,0x05,0x85,0x06,0x01,0x05,0x05,0x82,0x04,0x03,0x07,0x05,0x05,0x06,0x89,0x05,0x8d,0x06,0x8a,0x05,0x04,0x06,0x05,0x05,0x04,0x04,0x83,0x03,0x04,0x07,0x05,0x05,0x06,0x06,0x8f,0x05,0x09,0x06,0x05,0x05,0x04,0x04,0x07,0x07,0x05,0x05,0x06,0x8d,0x05,0x8f,0x06,0x07,0x05,
0x05,0x04,0x07,0x07,0x05,0x05,0x06,0x86,0x05,0x01,0x06,0x05,0x93,0x06,0x00,0x05,0x83,0x00,0x01,0x05,0x05,0x88,0x06,0x02,0x05,0x06,0x06,0x96,0x05,0x83,0x04,0x03,0x07,0x05,0x05,0x06,0x88,0x05,0x00,0x06,0x8c,0x05,0x82,0x06,0x88,0x05,0x04,0x06,0x06,0x05,0x04,0x04,0x82,0x03,0x06,0x07,0x07,0x05,0x05,0x06,0x05,0x06,0x8e,0x05,0x09,0x06,0x05,0x05,0x04,0x04,0x07,0x07,0x05,0x05,0x06,0x8a,0x05,0x82,0x06,0x90,0x05,0x06,0x06,0x04,0x07,0x07,0x05,0x05,0x06,0x87,0x05,0x01,0x06,0x06,0x92,0x05,0x84,0x00,0x01,0x05,0x05,0x8a,0x06,0x96,0x05,0x08,0x06,0x04,0x04,0x03,0x04,0x07,0x05,0x05,0x06,0x83,0x05,0x05,0x06,0x05,0x06,0x05,0x06,0x06,0x8e,0x05,0x00,0x06,
0x88,0x05,0x02,0x06,0x06,0x05,0x82,0x04,0x0c,0x03,0x03,0x07,0x05,0x05,0x06,0x06,0x05,0x06,0x06,0x05,0x06,0x06,0x8a,0x05,0x08,0x06,0x05,0x05,0x04,0x07,0x07,0x05,0x05,0x06,0x8a,0x05,0x01,0x06,0x06,0x92,0x05,0x00,0x04,0x82,0x07,0x02,0x05,0x05,0x06,0x86,0x05,0x83,0x06,0x01,0x05,0x05,0x85,0x00,0x87,0x05,0x86,0x00,0x01,0x05,0x05,0x8a,0x06,0x03,0x05,0x05,0x06,0x06,0x84,0x07,0x00,0x06,0x8a,0x07,0x00,0x06,0x83,0x04,0x05,0x03,0x04,0x07,0x05,0x05,0x06,0x82,0x05,0x86,0x06,0x82,0x05,0x03,0x06,0x06,0x07,0x07,0x83,0x06,0x84,0x05,0x82,0x06,0x82,0x05,0x0f,0x06,0x05,0x05,0x06,0x06,0x05,0x05,0x04,0x04,0x03,0x07,0x06,0x05,0x05,0x06,0x05,0x8a,0x06,0x85,
0x05,0x08,0x06,0x05,0x05,0x04,0x06,0x07,0x05,0x05,0x06,0x89,0x05,0x01,0x06,0x06,0x83,0x05,0x82,0x06,0x82,0x05,0x01,0x06,0x05,0x84,0x06,0x03,0x05,0x07,0x04,0x03,0x82,0x07,0x02,0x05,0x05,0x06,0x84,0x05,0x85,0x06,0x00,0x05,0x95,0x00,0x01,0x05,0x05,0x89,0x06,0x03,0x05,0x05,0x04,0x04,0x8b,0x03,0x00,0x04,0x82,0x03,0x00,0x04,0x83,0x03,0x09,0x04,0x04,0x03,0x03,0x07,0x05,0x05,0x06,0x06,0x05,0x87,0x06,0x82,0x05,0x03,0x04,0x04,0x03,0x03,0x83,0x04,0x01,0x06,0x06,0x82,0x05,0x8a,0x06,0x07,0x05,0x05,0x04,0x04,0x07,0x07,0x05,0x05,0x8f,0x06,0x83,0x05,0x08,0x06,0x05,0x05,0x04,0x06,0x06,0x05,0x06,0x06,0x88,0x05,0x01,0x06,0x06,0x82,0x05,0x0a,0x06,0x06,
0x07,0x07,0x06,0x05,0x05,0x06,0x07,0x06,0x06,0x82,0x07,0x03,0x06,0x06,0x07,0x07,0x82,0x03,0x03,0x07,0x05,0x05,0x06,0x82,0x05,0x87,0x06,0x00,0x05,0x95,0x00,0x01,0x05,0x05,0x89,0x06,0x01,0x05,0x05,0x82,0x04,0x97,0x03,0x04,0x07,0x05,0x05,0x06,0x05,0x88,0x06,0x04,0x05,0x04,0x05,0x06,0x04,0x82,0x03,0x83,0x04,0x03,0x06,0x06,0x05,0x05,0x8a,0x06,0x07,0x05,0x06,0x04,0x04,0x07,0x06,0x05,0x05,0x94,0x06,0x0c,0x05,0x05,0x04,0x07,0x05,0x05,0x06,0x06,0x05,0x06,0x05,0x06,0x05,0x84,0x06,0x13,0x05,0x05,0x06,0x04,0x06,0x07,0x03,0x06,0x05,0x05,0x06,0x07,0x06,0x06,0x07,0x07,0x04,0x06,0x06,0x07,0x83,0x03,0x05,0x07,0x07,0x05,0x05,0x06,0x05,0x89,0x06,0x96,
0x00,0x01,0x05,0x05,0x8a,0x06,0x01,0x05,0x05,0x91,0x04,0x87,0x03,0x02,0x07,0x05,0x05,0x8a,0x06,0x07,0x05,0x04,0x05,0x05,0x04,0x04,0x03,0x03,0x84,0x04,0x02,0x06,0x06,0x05,0x8a,0x06,0x06,0x05,0x05,0x04,0x04,0x07,0x05,0x05,0x95,0x06,0x05,0x05,0x05,0x04,0x07,0x05,0x05,0x8b,0x06,0x08,0x05,0x05,0x04,0x07,0x07,0x03,0x07,0x05,0x05,0x82,0x06,0x06,0x07,0x07,0x04,0x07,0x07,0x06,0x07,0x85,0x03,0x02,0x07,0x05,0x05,0x8b,0x06,0x00,0x05,0x95,0x00,0x01,0x05,0x05,0x8a,0x06,0x90,0x05,0x00,0x06,0x85,0x04,0x83,0x03,0x02,0x07,0x05,0x05,0x8a,0x06,0x05,0x05,0x04,0x04,0x05,0x06,0x04,0x82,0x03,0x83,0x04,0x02,0x06,0x05,0x05,0x8a,0x06,0x06,0x05,0x05,0x04,0x07,
0x06,0x05,0x05,0x95,0x06,0x05,0x05,0x05,0x04,0x06,0x05,0x05,0x8a,0x06,0x01,0x05,0x05,0x82,0x04,0x0d,0x03,0x07,0x06,0x05,0x05,0x07,0x07,0x06,0x07,0x07,0x04,0x07,0x06,0x07,0x86,0x03,0x02,0x07,0x05,0x05,0x8b,0x06,0x00,0x05,0x95,0x00,0x01,0x05,0x05,0x8c,0x06,0x92,0x05,0x82,0x04,0x83,0x03,0x02,0x07,0x05,0x05,0x82,0x06,0x82,0x05,0x84,0x06,0x00,0x05,0x82,0x04,0x04,0x05,0x04,0x04,0x03,0x03,0x82,0x04,0x00,0x06,0x82,0x05,0x8a,0x06,0x05,0x05,0x05,0x04,0x06,0x05,0x05,0x96,0x06,0x04,0x05,0x05,0x04,0x06,0x05,0x8b,0x06,0x09,0x05,0x05,0x04,0x07,0x03,0x03,0x07,0x05,0x05,0x06,0x82,0x07,0x04,0x04,0x07,0x07,0x06,0x07,0x87,0x03,0x02,0x07,0x05,0x05,0x8a,
0x06,0x8f,0x05,0x02,0x06,0x06,0x05,0x84,0x00,0x01,0x00,0x05,0x9d,0x06,0x83,0x05,0x82,0x04,0x04,0x03,0x03,0x07,0x05,0x05,0x83,0x06,0x01,0x05,0x05,0x84,0x06,0x05,0x05,0x06,0x04,0x06,0x05,0x06,0x84,0x04,0x00,0x06,0x82,0x05,0x8b,0x06,0x02,0x05,0x05,0x06,0x82,0x05,0x8a,0x06,0x00,0x05,0x8a,0x06,0x04,0x05,0x05,0x06,0x05,0x05,0x8b,0x06,0x08,0x05,0x06,0x04,0x07,0x03,0x07,0x06,0x05,0x05,0x82,0x07,0x00,0x04,0x84,0x07,0x87,0x03,0x02,0x07,0x05,0x05,0x8a,0x06,0x01,0x05,0x05,0x8f,0x06,0x00,0x05,0x84,0x00,0x02,0x00,0x05,0x05,0x91,0x06,0x00,0x05,0x82,0x06,0x04,0x05,0x05,0x06,0x05,0x05,0x84,0x06,0x82,0x05,0x05,0x04,0x04,0x03,0x07,0x05,0x05,0x84,0x06,
0x00,0x05,0x84,0x06,0x8e,0x05,0x8b,0x06,0x04,0x05,0x06,0x06,0x05,0x05,0x8b,0x06,0x00,0x05,0x8a,0x06,0x04,0x05,0x05,0x06,0x05,0x05,0x8b,0x06,0x10,0x05,0x04,0x04,0x03,0x03,0x06,0x06,0x05,0x07,0x04,0x07,0x04,0x03,0x07,0x07,0x06,0x07,0x88,0x03,0x02,0x07,0x05,0x05,0x9c,0x06,0x00,0x05,0x84,0x00,0x02,0x00,0x05,0x05,0xa0,0x06,0x82,0x05,0x04,0x04,0x04,0x07,0x05,0x05,0x8a,0x06,0x00,0x05,0x87,0x06,0x83,0x05,0x8d,0x06,0x84,0x05,0x8a,0x06,0x01,0x05,0x05,0x8a,0x06,0x04,0x05,0x05,0x04,0x05,0x05,0x8a,0x06,0x02,0x05,0x05,0x04,0x82,0x03,0x05,0x06,0x05,0x06,0x07,0x04,0x04,0x82,0x03,0x01,0x06,0x07,0x89,0x03,0x02,0x07,0x07,0x05,0x89,0x06,0x00,0x05,0x91,
0x06,0x00,0x05,0x84,0x00,0x02,0x00,0x05,0x05,0x82,0x06,0x00,0x05,0x9d,0x06,0x06,0x05,0x05,0x04,0x04,0x07,0x05,0x05,0x93,0x06,0x83,0x05,0x8c,0x06,0x84,0x05,0x8b,0x06,0x01,0x05,0x05,0x8a,0x06,0x04,0x05,0x05,0x04,0x05,0x05,0x8a,0x06,0x0f,0x05,0x05,0x04,0x03,0x03,0x07,0x06,0x05,0x07,0x07,0x04,0x07,0x03,0x03,0x07,0x07,0x8a,0x03,0x02,0x07,0x05,0x05,0x88,0x06,0x82,0x05,0x90,0x06,0x00,0x05,0x84,0x00,0x03,0x00,0x00,0x05,0x05,0xa1,0x06,0x05,0x05,0x05,0x04,0x07,0x05,0x05,0xa4,0x06,0x83,0x05,0x8b,0x06,0x82,0x05,0x8a,0x06,0x04,0x05,0x05,0x06,0x05,0x05,0x8a,0x06,0x0e,0x05,0x05,0x04,0x04,0x03,0x06,0x05,0x06,0x07,0x04,0x04,0x03,0x03,0x07,0x06,0x8b,
0x03,0x02,0x07,0x05,0x05,0x88,0x06,0x82,0x05,0x90,0x06,0x00,0x05,0x84,0x00,0x03,0x00,0x00,0x05,0x05,0x82,0x06,0x82,0x07,0x01,0x02,0x02,0x93,0x07,0x0b,0x03,0x02,0x07,0x02,0x07,0x06,0x06,0x05,0x06,0x06,0x05,0x05,0x83,0x02,0x00,0x03,0x84,0x02,0x01,0x07,0x06,0x8a,0x02,0x00,0x03,0x8a,0x02,0x00,0x07,0x84,0x05,0x01,0x06,0x06,0x88,0x07,0x83,0x05,0x88,0x07,0x09,0x06,0x06,0x05,0x05,0x06,0x05,0x05,0x06,0x07,0x07,0x87,0x02,0x0d,0x06,0x05,0x04,0x04,0x07,0x05,0x06,0x07,0x04,0x07,0x03,0x03,0x07,0x06,0x8c,0x03,0x03,0x07,0x07,0x05,0x07,0x92,0x06,0x85,0x07,0x82,0x02,0x00,0x06,0x84,0x00,0x82,0x00,0x02,0x05,0x05,0x02,0x90,0x01,0x00,0x02,0x86,0x01,0x85,
0x00,0x06,0x01,0x02,0x05,0x05,0x06,0x05,0x06,0x89,0x00,0x02,0x02,0x06,0x01,0x95,0x00,0x00,0x07,0x83,0x05,0x01,0x07,0x02,0x88,0x01,0x00,0x02,0x83,0x05,0x00,0x02,0x88,0x01,0x07,0x02,0x06,0x05,0x06,0x05,0x05,0x02,0x01,0x88,0x00,0x0d,0x07,0x05,0x04,0x04,0x06,0x05,0x07,0x03,0x04,0x07,0x03,0x03,0x07,0x07,0x8c,0x03,0x02,0x07,0x05,0x06,0x87,0x02,0x00,0x07,0x82,0x06,0x01,0x07,0x07,0x85,0x02,0x85,0x01,0x82,0x00,0x00,0x06,0x84,0x00,0x83,0x00,0x04,0x05,0x05,0x02,0x01,0x00,0x8e,0x01,0x82,0x02,0x83,0x01,0x86,0x00,0x01,0x01,0x06,0x82,0x05,0x00,0x06,0x89,0x00,0x02,0x02,0x05,0x06,0x94,0x00,0x00,0x02,0x83,0x05,0x01,0x06,0x02,0x89,0x01,0x00,0x06,0x82,
0x05,0x00,0x06,0x89,0x01,0x06,0x02,0x06,0x05,0x06,0x05,0x05,0x02,0x89,0x00,0x0c,0x07,0x05,0x04,0x06,0x05,0x06,0x07,0x04,0x04,0x03,0x03,0x07,0x07,0x8d,0x03,0x03,0x07,0x05,0x06,0x01,0x87,0x02,0x02,0x03,0x07,0x07,0x87,0x02,0x84,0x01,0x83,0x00,0x00,0x06,0x84,0x00,0x84,0x00,0x02,0x05,0x05,0x07,0x8d,0x01,0x83,0x02,0x02,0x03,0x02,0x02,0x82,0x01,0x85,0x00,0x01,0x01,0x02,0x82,0x05,0x00,0x06,0x89,0x00,0x03,0x02,0x05,0x05,0x02,0x91,0x00,0x01,0x01,0x02,0x84,0x05,0x01,0x02,0x02,0x88,0x01,0x05,0x02,0x05,0x05,0x06,0x05,0x05,0x8a,0x01,0x05,0x06,0x05,0x06,0x05,0x05,0x02,0x89,0x00,0x04,0x02,0x05,0x06,0x05,0x05,0x84,0x07,0x01,0x04,0x06,0x8e,0x03,0x02,
0x07,0x05,0x06,0x89,0x02,0x00,0x03,0x88,0x02,0x85,0x01,0x82,0x00,0x00,0x06,0x84,0x00,0x85,0x00,0x82,0x05,0x00,0x06,0x82,0x02,0x83,0x01,0x86,0x02,0x04,0x03,0x06,0x06,0x03,0x02,0x84,0x01,0x83,0x00,0x01,0x01,0x02,0x82,0x05,0x00,0x06,0x89,0x00,0x00,0x02,0x82,0x05,0x00,0x01,0x8f,0x00,0x01,0x01,0x07,0x84,0x05,0x01,0x06,0x02,0x89,0x01,0x05,0x06,0x05,0x06,0x06,0x05,0x06,0x8a,0x01,0x05,0x06,0x05,0x06,0x05,0x05,0x02,0x88,0x00,0x01,0x01,0x02,0x82,0x05,0x07,0x06,0x07,0x04,0x04,0x07,0x07,0x06,0x07,0x8e,0x03,0x02,0x07,0x05,0x06,0x95,0x02,0x86,0x01,0x00,0x06,0x84,0x00,0x87,0x00,0x84,0x05,0x8d,0x06,0x02,0x07,0x02,0x02,0x89,0x01,0x82,0x05,0x00,0x06,
0x89,0x00,0x00,0x02,0x82,0x05,0x00,0x06,0x8b,0x00,0x82,0x01,0x01,0x02,0x06,0x82,0x05,0x04,0x06,0x05,0x05,0x02,0x02,0x88,0x01,0x07,0x02,0x05,0x05,0x04,0x07,0x05,0x05,0x02,0x89,0x01,0x05,0x06,0x05,0x04,0x06,0x05,0x02,0x85,0x01,0x0e,0x00,0x01,0x00,0x01,0x01,0x06,0x05,0x06,0x04,0x07,0x04,0x04,0x03,0x06,0x06,0x8f,0x03,0x02,0x07,0x05,0x06,0x8a,0x02,0x00,0x06,0x8e,0x05,0x02,0x06,0x06,0x05,0x84,0x00,0x91,0x00,0x89,0x05,0x01,0x07,0x02,0x89,0x01,0x82,0x05,0x0b,0x06,0x01,0x01,0x00,0x01,0x01,0x00,0x01,0x00,0x00,0x01,0x02,0x83,0x05,0x00,0x03,0x8c,0x02,0x00,0x06,0x82,0x05,0x04,0x06,0x07,0x05,0x05,0x06,0x82,0x02,0x00,0x01,0x86,0x02,0x06,0x06,0x05,
0x04,0x04,0x07,0x05,0x05,0x83,0x02,0x86,0x01,0x05,0x06,0x05,0x04,0x06,0x05,0x07,0x8a,0x01,0x09,0x06,0x05,0x06,0x04,0x07,0x04,0x04,0x07,0x06,0x07,0x8f,0x03,0x02,0x07,0x05,0x06,0x8a,0x02,0x02,0x06,0x05,0x05,0x94,0x00,0x99,0x00,0x82,0x05,0x84,0x02,0x85,0x01,0x03,0x06,0x05,0x05,0x06,0x89,0x01,0x00,0x02,0x93,0x05,0x06,0x06,0x04,0x04,0x07,0x05,0x05,0x03,0x89,0x02,0x07,0x07,0x05,0x05,0x04,0x03,0x07,0x05,0x05,0x87,0x02,0x82,0x01,0x05,0x06,0x05,0x04,0x07,0x05,0x06,0x89,0x01,0x03,0x02,0x02,0x05,0x05,0x83,0x04,0x01,0x06,0x07,0x90,0x03,0x02,0x07,0x05,0x06,0x88,0x02,0x03,0x03,0x02,0x06,0x05,0x95,0x00,0x9a,0x00,0x02,0x05,0x05,0x06,0x87,0x02,0x05,
0x01,0x01,0x06,0x05,0x05,0x06,0x89,0x01,0x02,0x02,0x05,0x06,0x89,0x00,0x01,0x05,0x05,0x82,0x06,0x09,0x05,0x06,0x06,0x04,0x04,0x07,0x06,0x05,0x06,0x07,0x89,0x02,0x07,0x05,0x05,0x04,0x04,0x03,0x07,0x05,0x05,0x8a,0x02,0x06,0x06,0x05,0x04,0x07,0x05,0x05,0x02,0x83,0x01,0x01,0x02,0x02,0x82,0x01,0x08,0x02,0x02,0x06,0x05,0x06,0x04,0x07,0x06,0x06,0x91,0x03,0x02,0x07,0x05,0x06,0x85,0x02,0x83,0x03,0x01,0x02,0x06,0x96,0x00,0x9a,0x00,0x02,0x05,0x05,0x06,0x89,0x02,0x03,0x06,0x05,0x05,0x06,0x8a,0x02,0x00,0x05,0x8b,0x00,0x03,0x05,0x06,0x04,0x03,0x83,0x04,0x05,0x06,0x06,0x05,0x05,0x07,0x07,0x88,0x02,0x08,0x06,0x05,0x05,0x04,0x04,0x03,0x07,0x05,0x05,
0x8a,0x02,0x05,0x06,0x05,0x04,0x07,0x05,0x05,0x8b,0x02,0x06,0x07,0x05,0x05,0x06,0x04,0x06,0x04,0x91,0x03,0x02,0x07,0x05,0x06,0x83,0x02,0x02,0x07,0x03,0x03,0x82,0x07,0x01,0x02,0x06,0x96,0x00,0x9a,0x00,0x03,0x05,0x05,0x06,0x03,0x88,0x02,0x82,0x05,0x00,0x06,0x8a,0x02,0x00,0x05,0x8b,0x00,0x03,0x05,0x06,0x04,0x03,0x82,0x04,0x08,0x06,0x06,0x05,0x05,0x06,0x06,0x07,0x07,0x03,0x86,0x02,0x01,0x05,0x05,0x82,0x04,0x03,0x03,0x07,0x05,0x05,0x8a,0x02,0x06,0x06,0x05,0x04,0x07,0x06,0x05,0x06,0x8a,0x02,0x01,0x07,0x06,0x82,0x05,0x02,0x06,0x04,0x04,0x87,0x03,0x0c,0x04,0x04,0x03,0x04,0x07,0x04,0x03,0x03,0x07,0x07,0x05,0x06,0x02,0x88,0x07,0x02,0x03,0x06,
0x05,0x95,0x00,0x99,0x00,0x05,0x05,0x05,0x06,0x06,0x07,0x07,0x82,0x03,0x84,0x02,0x82,0x05,0x00,0x06,0x89,0x02,0x01,0x03,0x05,0x8c,0x00,0x00,0x05,0x84,0x04,0x00,0x06,0x82,0x05,0x82,0x06,0x83,0x07,0x04,0x03,0x07,0x03,0x03,0x06,0x82,0x05,0x82,0x06,0x82,0x05,0x00,0x02,0x84,0x03,0x84,0x02,0x06,0x06,0x05,0x04,0x07,0x07,0x05,0x05,0x8a,0x02,0x02,0x07,0x06,0x06,0x97,0x05,0x01,0x06,0x02,0x82,0x07,0x02,0x06,0x07,0x07,0x82,0x06,0x03,0x07,0x06,0x05,0x05,0x94,0x00,0x00,0x00,0x99,0x05,0x82,0x06,0x87,0x07,0x01,0x03,0x03,0x82,0x05,0x07,0x06,0x02,0x03,0x03,0x02,0x03,0x02,0x03,0x82,0x02,0x01,0x07,0x05,0x8d,0x00,0x00,0x05,0x82,0x04,0x01,0x06,0x06,0x82,
0x05,0x86,0x06,0x03,0x07,0x06,0x07,0x06,0x89,0x05,0x00,0x06,0x88,0x07,0x08,0x03,0x06,0x05,0x04,0x03,0x07,0x05,0x05,0x06,0x82,0x02,0x07,0x03,0x03,0x07,0x03,0x07,0x03,0x07,0x03,0x97,0x06,0x82,0x05,0x00,0x02,0x9e,0x06,0x02,0x05,0x00,0x00,0x02,0x05,0x05,0x03,0x9f,0x06,0x82,0x07,0x01,0x03,0x06,0x83,0x05,0x00,0x02,0x87,0x07,0x02,0x03,0x07,0x05,0x8d,0x00,0x04,0x05,0x06,0x04,0x04,0x06,0x82,0x05,0x96,0x06,0x02,0x07,0x04,0x06,0x85,0x07,0x08,0x03,0x05,0x05,0x04,0x03,0x07,0x07,0x05,0x05,0x8b,0x07,0x95,0x06,0x04,0x07,0x06,0x05,0x05,0x07,0x9d,0x06,0x03,0x02,0x05,0x00,0x00,0x02,0x05,0x05,0x07,0xa1,0x06,0x02,0x04,0x07,0x06,0x83,0x05,0x05,0x07,0x07,
0x06,0x07,0x07,0x06,0x83,0x07,0x01,0x06,0x05,0x8e,0x00,0x03,0x05,0x04,0x04,0x06,0x83,0x05,0x9d,0x06,0x0a,0x07,0x07,0x05,0x05,0x04,0x04,0x07,0x07,0x05,0x05,0x06,0x82,0x07,0x01,0x06,0x07,0x9d,0x06,0x02,0x05,0x05,0x07,0x9d,0x06,0x03,0x07,0x05,0x00,0x00,0x02,0x05,0x05,0x07,0xa2,0x06,0x00,0x07,0x84,0x05,0x00,0x07,0x89,0x06,0x00,0x05,0x8e,0x00,0x00,0x05,0x82,0x06,0x84,0x05,0x9d,0x06,0x09,0x07,0x05,0x05,0x04,0x03,0x03,0x07,0x07,0x05,0x05,0xa2,0x06,0x02,0x05,0x05,0x07,0x9d,0x06,0x03,0x07,0x05,0x00,0x00,0x01,0x05,0x05,0xa4,0x06,0x05,0x05,0x05,0x06,0x05,0x05,0x07,0x89,0x06,0x00,0x05,0x8f,0x00,0x01,0x05,0x06,0x84,0x05,0x88,0x06,0x00,0x05,0x95,
0x06,0x02,0x05,0x05,0x04,0x82,0x03,0x03,0x07,0x06,0x05,0x05,0xa1,0x06,0x01,0x05,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x01,0x05,0x05,0xa3,0x06,0x00,0x05,0x82,0x00,0x01,0x05,0x05,0x8a,0x06,0x00,0x05,0x90,0x00,0x85,0x05,0x87,0x06,0x82,0x05,0x94,0x06,0x07,0x05,0x05,0x04,0x04,0x03,0x03,0x07,0x07,0x82,0x05,0xa0,0x06,0x01,0x05,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x01,0x05,0x05,0xa2,0x06,0x01,0x05,0x05,0x82,0x00,0x01,0x05,0x05,0x8a,0x06,0x00,0x05,0x90,0x00,0x83,0x05,0x89,0x06,0x82,0x05,0x94,0x06,0x02,0x05,0x05,0x04,0x82,0x03,0x82,0x07,0x82,0x05,0x9f,0x06,0x01,0x05,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x01,0x05,0x05,0xa1,0x06,0x01,0x05,0x05,0x83,
0x00,0x01,0x05,0x05,0x8a,0x06,0x00,0x05,0x8f,0x00,0x85,0x05,0x87,0x06,0x84,0x05,0x93,0x06,0x03,0x05,0x05,0x04,0x04,0x82,0x03,0x02,0x07,0x07,0x06,0x82,0x05,0x9e,0x06,0x01,0x05,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x01,0x05,0x05,0xa0,0x06,0x01,0x05,0x05,0x84,0x00,0x01,0x05,0x05,0x8a,0x06,0x00,0x05,0x8f,0x00,0x84,0x05,0x87,0x06,0x82,0x05,0x02,0x06,0x05,0x05,0x93,0x06,0x02,0x05,0x05,0x04,0x83,0x03,0x01,0x07,0x06,0x85,0x05,0x9c,0x06,0x01,0x05,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x01,0x05,0x05,0x9e,0x06,0x82,0x05,0x85,0x00,0x01,0x05,0x05,0x8a,0x06,0x00,0x05,0x8e,0x00,0x87,0x05,0x85,0x06,0x06,0x05,0x05,0x06,0x07,0x06,0x05,0x05,0x92,0x06,0x02,
0x05,0x05,0x04,0x82,0x03,0x05,0x07,0x04,0x06,0x05,0x06,0x07,0x84,0x05,0x9a,0x06,0x01,0x05,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x01,0x05,0x05,0x9b,0x06,0x83,0x05,0x87,0x00,0x01,0x05,0x05,0x89,0x06,0x01,0x05,0x05,0x8e,0x00,0x8b,0x05,0x00,0x06,0x82,0x05,0x02,0x04,0x07,0x07,0x82,0x05,0x91,0x06,0x09,0x05,0x05,0x04,0x03,0x03,0x07,0x03,0x06,0x05,0x05,0x82,0x07,0x88,0x05,0x94,0x06,0x82,0x05,0x9f,0x06,0x02,0x05,0x00,0x00,0x00,0x00,0x9e,0x05,0x89,0x00,0x8c,0x05,0x8f,0x00,0x8e,0x05,0x03,0x04,0x03,0x03,0x07,0x96,0x05,0x00,0x04,0x82,0x03,0x06,0x04,0x06,0x05,0x04,0x03,0x04,0x06,0x83,0x00,0xbd,0x05,0x01,0x00,0x00,0xcb,0x00,0x88,0x05,0x01,0x06,0x04,
0x82,0x03,0x00,0x07,0x94,0x05,0x0a,0x06,0x04,0x03,0x07,0x03,0x04,0x05,0x06,0x04,0x04,0x07,0xc4,0x00,0xcc,0x00,0x02,0x05,0x06,0x07,0x83,0x06,0x88,0x03,0x91,0x07,0x84,0x03,0x05,0x07,0x05,0x06,0x07,0x07,0x04,0xc5,0x00,0xcd,0x00,0x00,0x05,0x85,0x04,0x9e,0x03,0x05,0x06,0x05,0x06,0x03,0x04,0x04,0xc5,0x00,0xce,0x00,0x00,0x06,0x84,0x04,0x9d,0x03,0x02,0x07,0x05,0x06,0x82,0x04,0xc6,0x00,0xce,0x00,0x00,0x05,0x84,0x04,0x9c,0x03,0x05,0x04,0x06,0x05,0x04,0x03,0x04,0xc7,0x00,0xcf,0x00,0x00,0x06,0x84,0x04,0x9b,0x03,0x05,0x06,0x05,0x06,0x07,0x04,0x07,0xc7,0x00,0xcf,0x00,0x01,0x05,0x06,0x83,0x04,0x8d,0x03,0x00,0x02,0x8b,0x03,0x05,0x04,0x06,0x05,0x07,
0x03,0x04,0xc8,0x00,0xd0,0x00,0x00,0x06,0x84,0x04,0x99,0x03,0x04,0x06,0x05,0x04,0x03,0x04,0xc9,0x00,0xd1,0x00,0x00,0x06,0x82,0x04,0x99,0x03,0x05,0x07,0x05,0x05,0x04,0x04,0x07,0xc9,0x00,0xd1,0x00,0x00,0x05,0x84,0x04,0x96,0x03,0x05,0x04,0x06,0x05,0x04,0x03,0x07,0xca,0x00,0xd0,0x00,0x08,0x06,0x05,0x05,0x06,0x04,0x04,0x03,0x03,0x04,0x87,0x07,0x87,0x03,0x01,0x07,0x07,0x85,0x06,0x02,0x07,0x04,0x06,0xca,0x00,0xcc,0x00,0x86,0x05,0x00,0x06,0x82,0x04,0x01,0x07,0x06,0x87,0x05,0x01,0x06,0x07,0x83,0x03,0x02,0x07,0x06,0x06,0x85,0x05,0x01,0x06,0x07,0x82,0x06,0x83,0x05,0x8b,0x00,0x83,0x05,0xb5,0x00,0xbb,0x00,0x88,0x05,0x86,0x00,0x88,0x05,0x03,0x06,
0x04,0x06,0x06,0x89,0x05,0x00,0x06,0x83,0x03,0x00,0x06,0x88,0x05,0x03,0x06,0x06,0x07,0x06,0x88,0x05,0x84,0x00,0x87,0x05,0xb3,0x00,0xbb,0x00,0x89,0x05,0x84,0x00,0x89,0x05,0x03,0x06,0x06,0x04,0x06,0x89,0x05,0x04,0x06,0x07,0x03,0x07,0x07,0x89,0x05,0x02,0x06,0x06,0x07,0x89,0x05,0x83,0x00,0x88,0x05,0xb3,0x00,0xba,0x00,0x8a,0x05,0x84,0x00,0x8a,0x05,0x82,0x06,0x8a,0x05,0x03,0x07,0x03,0x07,0x06,0x8a,0x05,0x01,0x00,0x00,0x89,0x05,0x83,0x00,0x89,0x05,0xb2,0x00,0xba,0x00,0x84,0x05,0x00,0x00,0x84,0x05,0x83,0x00,0x84,0x05,0x00,0x00,0x85,0x05,0x01,0x06,0x06,0x84,0x05,0x00,0x00,0x84,0x05,0x03,0x06,0x07,0x03,0x07,0x84,0x05,0x01,0x00,0x00,0x84,0x05,
0x83,0x00,0x86,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0xb2,0x00,0xba,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x02,0x06,0x05,0x06,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x03,0x06,0x04,0x03,0x07,0x83,0x05,0x82,0x00,0x84,0x05,0x84,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0xb3,0x00,0xba,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x02,0x06,0x05,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x00,0x06,0x82,0x07,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0xb3,0x00,0xba,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,
0x00,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0x02,0x07,0x06,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x03,0x06,0x07,0x03,0x07,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0xb3,0x00,0xba,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x83,0x00,0x84,0x05,0x01,0x00,0x00,0x84,0x05,0x02,0x07,0x07,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x03,0x07,0x07,0x04,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0xb9,0x00,0xba,0x00,0x82,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x84,0x05,0x02,0x00,0x07,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x03,0x07,0x03,0x04,0x06,0x83,0x05,0x82,0x00,
0x83,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0xb9,0x00,0xba,0x00,0x82,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x82,0x00,0x00,0x06,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0x02,0x07,0x03,0x07,0x84,0x05,0x82,0x00,0x83,0x05,0x84,0x00,0x84,0x05,0x85,0x00,0x83,0x05,0xb9,0x00,0xba,0x00,0x82,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x82,0x00,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x03,0x06,0x04,0x03,0x07,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x86,0x00,0x84,0x05,0xb8,0x00,0xb9,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x89,0x05,0x03,0x06,
0x03,0x03,0x07,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x86,0x00,0x84,0x05,0xb8,0x00,0xb9,0x00,0x8a,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0x83,0x00,0x88,0x05,0x04,0x06,0x07,0x03,0x03,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x87,0x00,0x84,0x05,0xb7,0x00,0xb9,0x00,0x89,0x05,0x84,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x83,0x00,0x89,0x05,0x04,0x07,0x04,0x03,0x07,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x88,0x00,0x84,0x05,0xb6,0x00,0xb9,0x00,0x88,0x05,0x85,0x00,0x82,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x8a,0x05,0x03,0x07,0x03,0x07,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,
0x05,0x89,0x00,0x84,0x05,0xb5,0x00,0xb9,0x00,0x88,0x05,0x85,0x00,0x82,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0x03,0x07,0x03,0x07,0x06,0x83,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x8a,0x00,0x83,0x05,0xb5,0x00,0xb9,0x00,0x88,0x05,0x84,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0x02,0x07,0x03,0x07,0x84,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x82,0x05,0x8b,0x00,0x83,0x05,0xb5,0x00,0xb9,0x00,0x82,0x05,0x01,0x00,0x00,0x83,0x05,0x84,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x84,0x05,0x02,0x07,0x04,0x06,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x85,
0x00,0x83,0x05,0x8b,0x00,0x83,0x05,0xb5,0x00,0xb8,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x84,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x02,0x06,0x07,0x07,0x84,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x8c,0x00,0x82,0x05,0xb5,0x00,0xb8,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x84,0x00,0x83,0x05,0x82,0x00,0x83,0x05,0x83,0x00,0x82,0x05,0x82,0x00,0x83,0x05,0x82,0x06,0x84,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x86,0x00,0x01,0x05,0x05,0x82,0x00,0x83,0x05,0xb5,0x00,0xb8,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x84,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x84,0x00,0x82,0x05,0x82,0x00,0x83,
0x05,0x01,0x06,0x06,0x85,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0xb5,0x00,0xb8,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x84,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x82,0x00,0x85,0x05,0x00,0x06,0x84,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0xb5,0x00,0xb8,0x00,0x83,0x05,0x01,0x00,0x00,0x83,0x05,0x83,0x00,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x83,0x00,0x83,0x05,0x01,0x00,0x00,0x86,0x05,0x00,0x06,0x84,0x05,0x82,0x00,0x83,0x05,0x85,0x00,0x82,0x05,0x85,0x00,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0xb5,0x00,0xb8,0x00,0x82,0x05,
0x82,0x00,0x84,0x05,0x82,0x00,0x84,0x05,0x00,0x00,0x84,0x05,0x83,0x00,0x8b,0x05,0x01,0x00,0x00,0x84,0x05,0x01,0x00,0x00,0x83,0x05,0x86,0x00,0x82,0x05,0x85,0x00,0x84,0x05,0x00,0x06,0x84,0x05,0xb5,0x00,0xb7,0x00,0x83,0x05,0x82,0x00,0x84,0x05,0x82,0x00,0x8a,0x05,0x83,0x00,0x8a,0x05,0x83,0x00,0x89,0x05,0x85,0x00,0x83,0x05,0x85,0x00,0x89,0x05,0xb6,0x00,0xb7,0x00,0x83,0x05,0x82,0x00,0x84,0x05,0x83,0x00,0x88,0x05,0x84,0x00,0x89,0x05,0x84,0x00,0x89,0x05,0x85,0x00,0x83,0x05,0x86,0x00,0x88,0x05,0xb6,0x00,0xb8,0x00,0x82,0x05,0x83,0x00,0x83,0x05,0x84,0x00,0x86,0x05,0x85,0x00,0x87,0x05,0x87,0x00,0x86,0x05,0x87,0x00,0x83,0x05,0x87,0x00,0x85,0x05,
0xb8,0x00,0xca,0x00,0x82,0x05,0x99,0x00,0x82,0x05,0x97,0x00,0x82,0x05,0xb9,0x00,0xff,0x00,0xbf,0x00,0xff,0x00,0xbf,0x00,0xff,0x00,0xbf,0x00
};
// http://paulbourke.net/dataformats/tga/
typedef struct {
char idlength;
char colourmaptype;
@ -90,11 +98,12 @@ typedef struct {
byte data[0];
} TGAHeader;
void draw_tga(const byte* tgadata, byte x, byte y) {
void draw_tga(const byte* tgadata, byte cenx, byte ceny) {
const TGAHeader* hdr = (TGAHeader*) tgadata;
const byte* src = hdr->data;
byte* dest = &vidmem[x][y];
byte* dest = &vidmem[cenx-hdr->width/4][ceny-hdr->height/2];
byte i,j,lastbyte;
// set palette from TGA
for (i=0; i<8; i++) {
byte pal = 0;
pal |= (hdr->palette[i].r >> 5);
@ -102,39 +111,38 @@ void draw_tga(const byte* tgadata, byte x, byte y) {
pal |= (hdr->palette[i].b) & 0xc0;
palette[i] = pal;
}
// iterate over height of image
for (j=0; j<hdr->height; j++) {
byte* start = dest;
i = 0;
lastbyte = 0;
// iterate over width of image
while (i<hdr->width) {
byte count = *src++;
byte rle = count & 0x80;
byte rle = count & 0x80; // RLE has hi bit set
byte color = 0;
if (rle) {
color = *src++; // fetch RLE byte
count &= 0x7f;
count &= 0x7f; // discard hi bit
}
do {
if (!rle)
color = *src++; // fetch raw data
color = *src++; // no RLE, fetch raw data
if ((i&1)==0) {
*dest = lastbyte = (color << 4); // even byte
} else {
*dest = lastbyte | color; // odd byte
dest += 256;
dest += 256; // move right two pixels
}
i++;
} while (count--);
}
dest = start+1;
watchdog0x39 = 0x39;
dest = start+1; // next scanline
watchdog0x39 = 0x39; // watchdog reset
}
}
void clrscr() {
// doesn't work because memset uses LDIR
// and reads come from ROM
//memset(vidmem, 0, sizeof(vidmem));
word i = sizeof(vidmem)-1;
do {
vidmem[0][i] = 0;
@ -144,7 +152,7 @@ void clrscr() {
void main() {
clrscr();
draw_tga(example_tga, 45, 76); // array, so no &
draw_tga(example_tga, 152/2, 256/2);
while (1) {
watchdog0x39 = 0x39;
}

View File

@ -2,12 +2,14 @@
#include <string.h>
typedef unsigned char byte;
typedef signed char sbyte;
typedef unsigned short word;
byte __at (0x0) vidmem[152][256]; // 304x256x4bpp video memory
byte __at (0xc000) palette[16];
volatile byte __at (0xc800) input0;
volatile byte __at (0xc802) input1;
volatile byte __at (0xc804) input2;
volatile byte __at (0xc804) input0;
volatile byte __at (0xc806) input1;
volatile byte __at (0xc80c) input2;
byte __at (0xc900) rom_select;
volatile byte __at (0xcb00) video_counter;
byte __at (0xcbff) watchdog0x39;
@ -32,7 +34,29 @@ struct {
byte height;
} __at (0xca00) blitter;
byte __at (0x0) vidmem[128][304]; // 256x304x4bpp video memory
// switch flags
#define UP1 (input0 & 0x1)
#define DOWN1 (input0 & 0x2)
#define LEFT1 (input0 & 0x4)
#define RIGHT1 (input0 & 0x8)
#define START1 (input0 & 0x10)
#define START2 (input0 & 0x20)
#define UP2 (input0 & 0x40)
#define DOWN2 (input0 & 0x80)
#define LEFT2 (input1 & 0x1)
#define RIGHT2 (input1 & 0x2)
#define AUTOUP (input2 & 0x1)
#define ADVANCE (input2 & 0x2)
#define COIN2 (input2 & 0x4)
#define HIGHSCORERESET (input2 & 0x8)
#define COIN1 (input2 & 0x10)
#define COIN3 (input2 & 0x20)
#define TILTSWITCH (input2 & 0x40)
#define SOUNDACK (input2 & 0x80)
#define WATCHDOG watchdog0x39=0x39;
//
void main();
@ -52,8 +76,85 @@ __endasm;
main();
}
#define LOCHAR 0x21
#define HICHAR 0x5e
const byte font8x8[HICHAR-LOCHAR+1][8] = {
{ 0x18,0x18,0x18,0x18,0x00,0x00,0x18,0x00 }, { 0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00 }, { 0x66,0x66,0xff,0x66,0xff,0x66,0x66,0x00 }, { 0x18,0x3e,0x60,0x3c,0x06,0x7c,0x18,0x00 }, { 0x62,0x66,0x0c,0x18,0x30,0x66,0x46,0x00 }, { 0x3c,0x66,0x3c,0x38,0x67,0x66,0x3f,0x00 }, { 0x06,0x0c,0x18,0x00,0x00,0x00,0x00,0x00 }, { 0x0c,0x18,0x30,0x30,0x30,0x18,0x0c,0x00 }, { 0x30,0x18,0x0c,0x0c,0x0c,0x18,0x30,0x00 }, { 0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00 }, { 0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00 }, { 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30 }, { 0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00 }, { 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00 }, { 0x00,0x03,0x06,0x0c,0x18,0x30,0x60,0x00 }, { 0x3c,0x66,0x6e,0x76,0x66,0x66,0x3c,0x00 }, { 0x18,0x18,0x38,0x18,0x18,0x18,0x7e,0x00 }, { 0x3c,0x66,0x06,0x0c,0x30,0x60,0x7e,0x00 }, { 0x3c,0x66,0x06,0x1c,0x06,0x66,0x3c,0x00 }, { 0x06,0x0e,0x1e,0x66,0x7f,0x06,0x06,0x00 }, { 0x7e,0x60,0x7c,0x06,0x06,0x66,0x3c,0x00 }, { 0x3c,0x66,0x60,0x7c,0x66,0x66,0x3c,0x00 }, { 0x7e,0x66,0x0c,0x18,0x18,0x18,0x18,0x00 }, { 0x3c,0x66,0x66,0x3c,0x66,0x66,0x3c,0x00 }, { 0x3c,0x66,0x66,0x3e,0x06,0x66,0x3c,0x00 }, { 0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00 }, { 0x00,0x00,0x18,0x00,0x00,0x18,0x18,0x30 }, { 0x0e,0x18,0x30,0x60,0x30,0x18,0x0e,0x00 }, { 0x00,0x00,0x7e,0x00,0x7e,0x00,0x00,0x00 }, { 0x70,0x18,0x0c,0x06,0x0c,0x18,0x70,0x00 }, { 0x3c,0x66,0x06,0x0c,0x18,0x00,0x18,0x00 }, { 0x3c,0x66,0x6e,0x6e,0x60,0x62,0x3c,0x00 }, { 0x18,0x3c,0x66,0x7e,0x66,0x66,0x66,0x00 }, { 0x7c,0x66,0x66,0x7c,0x66,0x66,0x7c,0x00 }, { 0x3c,0x66,0x60,0x60,0x60,0x66,0x3c,0x00 }, { 0x78,0x6c,0x66,0x66,0x66,0x6c,0x78,0x00 }, { 0x7e,0x60,0x60,0x78,0x60,0x60,0x7e,0x00 }, { 0x7e,0x60,0x60,0x78,0x60,0x60,0x60,0x00 }, { 0x3c,0x66,0x60,0x6e,0x66,0x66,0x3c,0x00 }, { 0x66,0x66,0x66,0x7e,0x66,0x66,0x66,0x00 }, { 0x3c,0x18,0x18,0x18,0x18,0x18,0x3c,0x00 }, { 0x1e,0x0c,0x0c,0x0c,0x0c,0x6c,0x38,0x00 }, { 0x66,0x6c,0x78,0x70,0x78,0x6c,0x66,0x00 }, { 0x60,0x60,0x60,0x60,0x60,0x60,0x7e,0x00 }, { 0x63,0x77,0x7f,0x6b,0x63,0x63,0x63,0x00 }, { 0x66,0x76,0x7e,0x7e,0x6e,0x66,0x66,0x00 }, { 0x3c,0x66,0x66,0x66,0x66,0x66,0x3c,0x00 }, { 0x7c,0x66,0x66,0x7c,0x60,0x60,0x60,0x00 }, { 0x3c,0x66,0x66,0x66,0x66,0x3c,0x0e,0x00 }, { 0x7c,0x66,0x66,0x7c,0x78,0x6c,0x66,0x00 }, { 0x3c,0x66,0x60,0x3c,0x06,0x66,0x3c,0x00 }, { 0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x00 }, { 0x66,0x66,0x66,0x66,0x66,0x66,0x3c,0x00 }, { 0x66,0x66,0x66,0x66,0x66,0x3c,0x18,0x00 }, { 0x63,0x63,0x63,0x6b,0x7f,0x77,0x63,0x00 }, { 0x66,0x66,0x3c,0x18,0x3c,0x66,0x66,0x00 }, { 0x66,0x66,0x66,0x3c,0x18,0x18,0x18,0x00 }, { 0x7e,0x06,0x0c,0x18,0x30,0x60,0x7e,0x00 }, { 0x3c,0x30,0x30,0x30,0x30,0x30,0x3c,0x00 }, { 0x00,0x60,0x30,0x18,0x0c,0x06,0x03,0x00 }, { 0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00 }, { 0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18 }
};
static byte font_table[HICHAR-LOCHAR+1][8*4];
void fill_char_table_entry(char ch) {
const byte* src = &font8x8[ch-LOCHAR][0];
byte* data = &font_table[ch-LOCHAR][0];
int i,j,pixels;
for (i=0; i<8; i++) {
byte b = *src++;
for (j=0; j<4; j++) {
pixels = 0;
if (b & 0x80) pixels |= 0xf0;
if (b & 0x40) pixels |= 0x0f;
*data++ = pixels;
b <<= 2;
}
}
}
void fill_char_table() {
char ch;
for (ch=LOCHAR; ch<=HICHAR; ch++) {
fill_char_table_entry(ch);
}
}
const byte palette_data[16] = {
0x00, 0x03, 0x19, 0x50, 0x52, 0x07, 0x1f, 0x37, 0xe0, 0xa4, 0xfd, 0xff, 0x00, 0x00, 0x00, 0xf8, };
0x00, 0x03, 0x19, 0x50, 0x52, 0x07, 0x1f, 0x37, 0xe0, 0xa4, 0xfd, 0xff, 0x38, 0x70, 0x7f, 0xf8, };
const byte laser_vert[2+1*8] = {
1,8,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
};
const byte laser_horiz[2+4*2] = {
4,2,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
};
const byte playersprite1[] = {
7,16,
0x00,0x00,0xef,0xef,0xe0,0x00,0x00,
0x00,0xee,0xee,0xfe,0xee,0xe0,0x00,
0x0e,0xed,0xef,0xef,0xed,0xee,0x00,
0x0e,0xee,0xdd,0xdd,0xde,0xee,0x00,
0x0e,0xee,0xed,0xde,0xee,0xee,0x00,
0x00,0xee,0xee,0xde,0xee,0xe0,0x00,
0x00,0xee,0xee,0xde,0xee,0xe0,0x00,
0x00,0x00,0xed,0xdd,0xe0,0x00,0x0d,
0xdd,0xdd,0xee,0xee,0xed,0xdd,0xd0,
0x0d,0xee,0xee,0xee,0xee,0xee,0x00,
0x0e,0xe0,0xee,0xee,0xe0,0xee,0x00,
0x0e,0xe0,0xee,0xee,0xe0,0xee,0x00,
0x0e,0xe0,0xdd,0xdd,0xd0,0xde,0x00,
0x0d,0x00,0xee,0x0e,0xe0,0x0d,0x00,
0x00,0x00,0xed,0x0e,0xe0,0x00,0x00,
0x00,0x0d,0xdd,0x0d,0xdd,0x00,0x18,
};
const byte sprite1[2+16*16/2] = {
8,16,
@ -301,6 +402,18 @@ inline void draw_sprite_strided(const byte* data, byte x, byte y, byte stride) {
}
}
inline void draw_char(char ch, byte x, byte y, byte color) {
if (ch < LOCHAR || ch > HICHAR) return;
blit_copy_solid(x, y, 4, 8, font_table[ch - LOCHAR], color);
}
void draw_string(const char* str, byte x, byte y, byte color) {
while (*str) {
draw_char(*str++, x, y, color);
x += 4;
}
}
typedef struct Actor* a;
typedef void ActorUpdateFn(struct Actor* a);
@ -314,6 +427,9 @@ typedef struct Actor {
byte* shape;
ActorUpdateFn* update;
ActorDrawFn* draw;
union {
struct { sbyte dx,dy; } laser;
} u;
} Actor;
#define GBITS 3
@ -355,26 +471,70 @@ void delete_from_grid(byte gi, byte actor_index) {
actors[actor_index].grid_index = 0;
}
void add_actor(byte actor_index) {
struct Actor* a = &actors[actor_index];
insert_into_grid(xy2grid(a->x, a->y), actor_index);
}
void enumerate_actors_at_grid(ActorEnumerateFn* enumfn, byte gi) {
byte ai = grid[gi];
while (ai) {
Actor* a = &actors[ai];
enumfn(a);
ai = a->next_actor;
}
}
void enumerate_actors_in_rect(ActorEnumerateFn* enumfn,
byte x1, byte y1, byte x2, byte y2) {
byte gi = xy2grid(x1, y1);
byte gi1 = xy2grid(x2, y2) + 1;
byte gwidth = 1 + ((gi1 - gi) & (GDIM-1));
byte x;
do {
for (x=0; x<gwidth; x++) {
byte ai = grid[gi];
while (ai) {
Actor* a = &actors[ai];
enumfn(a);
ai = a->next_actor;
}
gi++;
}
if (gi == gi1) break;
gi += GDIM - gwidth;
} while (1);
}
void draw_actor_normal(struct Actor* a) {
draw_sprite(a->shape, a->x, a->y);
}
void draw_actor_debug(struct Actor* a) {
draw_sprite_solid(a->shape, a->x, a->y, a->next_actor?0xff:0x66);
draw_sprite_solid(a->shape, a->x, a->y, a->next_actor?0xff:0x33);
}
byte update_actor(byte actor_index) {
struct Actor* a = &actors[actor_index];
byte next_actor;
byte next_actor = a->next_actor;
byte gi0,gi1;
if (!a->shape) return 0; // no shape present, ignore
next_actor = a->next_actor; // fetch in case it changes
gi0 = a->grid_index;
draw_sprite_solid(a->shape, a->x, a->y, 0); // erase
if (a->update) a->update(a); // move
if (a->draw) a->draw(a); // draw
gi1 = xy2grid(a->x, a->y);
// has grid bucket changed?
if (gi0 != gi1) {
// remove from old, add to new bucket
delete_from_grid(gi0, actor_index);
insert_into_grid(gi1, actor_index);
// if NULL shape, we don't have anything
if (a->shape) {
gi0 = a->grid_index;
draw_sprite_solid(a->shape, a->x, a->y, 0);
if (a->update) a->update(a);
// did we delete it?
if (a->shape) {
if (a->draw) a->draw(a);
gi1 = xy2grid(a->x, a->y);
// grid bucket changed?
if (gi0 != gi1) {
delete_from_grid(gi0, actor_index);
insert_into_grid(gi1, actor_index);
}
} else {
delete_from_grid(gi0, actor_index);
}
}
return next_actor;
}
@ -418,6 +578,48 @@ void update_grid_rows(byte row_start, byte row_end) {
}
}
byte did_overflow() {
__asm
ld l,#0
ret nc
inc l
__endasm;
}
void laser_move(Actor* a) {
a->x += a->u.laser.dx;
if (a->x > 152) a->shape = NULL;
a->y += a->u.laser.dy;
if (a->y > 255-8) a->shape = NULL;
}
void shoot_laser(sbyte dx, sbyte dy, const byte* shape) {
actors[2].shape = (void*) shape;
actors[2].x = actors[1].x;
actors[2].y = actors[1].y;
actors[2].u.laser.dx = dx;
actors[2].u.laser.dy = dy;
add_actor(2);
}
void player_move(Actor* a) {
byte x = a->x;
byte y = a->y;
if (UP1) y-=2;
if (DOWN1) y+=2;
if (LEFT1) x-=1;
if (RIGHT1) x+=1;
a->x = x;
a->y = y;
// shoot laser
if (actors[2].shape == NULL) {
if (UP2) shoot_laser(0,-8,laser_vert);
else if (DOWN2) shoot_laser(0,8,laser_vert);
else if (LEFT2) shoot_laser(-4,0,laser_horiz);
else if (RIGHT2) shoot_laser(4,0,laser_horiz);
}
}
void main() {
byte i;
byte num_actors = 32;
@ -425,23 +627,31 @@ void main() {
memset(grid, 0, sizeof(grid));
memset(actors, 0, sizeof(actors));
memcpy(palette, palette_data, 16);
fill_char_table();
WATCHDOG;
for (i=1; i<num_actors; i++) {
Actor* a = &actors[i];
a->x = (i & 7) * 16 + 16;
a->y = (i / 4) * 24 + 32;
a->y = (i / 4) * 16 + 32;
a->shape = (void*) all_sprites[i%9];
a->update = random_walk;
a->draw = draw_actor_debug;
insert_into_grid(xy2grid(a->x, a->y), i);
watchdog0x39 = 0x39;
//a->update = random_walk;
a->draw = draw_actor_normal;
add_actor(i);
}
actors[1].shape = (void*) playersprite1;
actors[1].update = player_move;
actors[2].update = laser_move;
actors[2].shape = NULL;
WATCHDOG;
while (1) {
// update top half while drawing bottom half
while (video_counter < 0x80) ;
update_grid_rows(0,GDIM/2);
// update bottom half while drawing top half
while (video_counter >= 0x80) ;
update_grid_rows(GDIM/2,GDIM);
watchdog0x39 = 0x39;
while (video_counter == 0) ;
update_grid_rows(GDIM*3/4, GDIM*4/4);
while (video_counter == 0x3c) ;
update_grid_rows(GDIM*0/4, GDIM*1/4);
while (video_counter == 0xbc) ;
update_grid_rows(GDIM*1/4, GDIM*2/4);
while (video_counter == 0xfc) ;
update_grid_rows(GDIM*2/4, GDIM*3/4);
WATCHDOG;
}
}

View File

@ -12,12 +12,14 @@
convert $< -resize 48x192\! -colorspace Gray -dither FloydSteinberg $@
%.tga: %.png
convert $< -resize 128x96\! +dither $<.gif
convert $<.gif -type palette -compress RLE -colors 8 +dither -flip $@
convert $< -resize 192 $<.gif
convert $<.gif +dither -type palette -compress RLE -colors 8 +dither -flip $@
convert $@ $@.png
%.pcx: %.png
convert $< -format raw -type palette -compress none -colors 15 +dither $@
%.rle.pcx: %.png
convert $< -format raw -type palette -compress rle -colors 15 +dither $@
%.4.pcx: %.png
convert $< -format raw -type palette -compress none -colors 4 +dither $@