/* ColdReset: * Simule un dé/rebranchement du TO7-70. */ void to7_ColdReset(void) { /* initialisation du PIA 6846 système */ mc6846_Init(&mc6846, 0, 0x81, 0x7D); SetNoCapsLed(0); /* initialisation du PIA 6821 système */ mc6821_Init(&pia_int.porta, 0, 0xFF); /* les bits 3-7 sont à 1 en entrée */ mc6821_Init(&pia_int.portb, 0, 0xFC); /* initialisation du PIA 6821 musique et jeux */ mc6821_Init(&pia_ext.porta, 0xC0, 0xFF); mc6821_Init(&pia_ext.portb, 0xC0, 0xCF); /* initialisation des pages mémoire */ mempager.cart.page = 0; mempager.cart.update(); mempager.screen.page = 1; mempager.screen.update(); mempager.system.page = 1; mempager.system.update(); mempager.data.page = 2; mempager.data.update(); mempager.mon.page = 0; mempager.mon.update(); /* initialisation du logic gate array */ memset(&lga, 0, sizeof(struct GATE_ARRAY)); /* initialisation du contrôleur de disquettes */ memset(&disk_ctrl, 0, sizeof(struct DISK_CTRL)); /* checksum application */ STORE_BYTE(0x60D1, 0); /* flag de reset à froid */ STORE_WORD(0x60FE, 0); mc6809_Reset(); }
/* * the 32 attribute flags parent sibling child properties * ---32 bits in 4 bytes--- ---3 bytes------------------ ---2 bytes-- * * the 48 attribute flags parent sibling child properties * ---48 bits in 6 bytes--- ---3 words, i.e. 6 bytes---- ---2 bytes-- */ static void SET_OBJECT(uint16_t obj1, uint16_t obj2, int offset) { if(zversion <= 3) STORE_BYTE(OBJECT(obj1) + offset, obj2); else STORE_WORD(OBJECT(obj1) + offset, obj2); }