Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "snesc.h"
- void snesc_init(void)
- {
- int i;
- __nmi_handler = snesc_vblank; /* register vblank handler */
- *((unsigned char*)0x4200) = 0x81; /* enable NMI, enable autojoy */
- snesc_timer_enabled = snesc_do_copy = snesc_controllers[0] = 0;
- /* snesc sprite init stuff */
- for(i = 0; i < 128; i++) {
- snesc_oam_table1[i].x = 0;
- snesc_oam_table1[i].y = 0xe8;
- snesc_oam_table1[i].t = 0;
- snesc_oam_table1[i].p = 0;
- }
- for(i = 0; i < 32; i+=2) {
- snesc_oam_table2[i] = 0;
- }
- }
- int main() {
- snesc_init();
- LoadSPC();
- while (1) {
- resettimer();
- sync(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement