ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/AmigaOS/main_amiga.cpp
(Generate patch)

Comparing BasiliskII/src/AmigaOS/main_amiga.cpp (file contents):
Revision 1.17 by cebix, 2001-06-30T17:21:52Z vs.
Revision 1.21 by cebix, 2002-01-15T14:58:34Z

# Line 1 | Line 1
1   /*
2   *  main_amiga.cpp - Startup code for AmigaOS
3   *
4 < *  Basilisk II (C) 1997-2001 Christian Bauer
4 > *  Basilisk II (C) 1997-2002 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 188 | Line 188 | int main(int argc, char **argv)
188                  QuitEmulator();
189          }
190  
191 +        if (FindTask((UBYTE *) "« Enforcer »"))
192 +                {
193 +                ErrorAlert(STR_ENFORCER_RUNNING_ERR);
194 +                QuitEmulator();
195 +                }
196 +
197          // These two can fail (the respective gfx support won't be available, then)
198          P96Base = OpenLibrary((UBYTE *)"Picasso96API.library", 2);
199          CyberGfxBase = OpenLibrary((UBYTE *)"cybergraphics.library", 2);
# Line 472 | Line 478 | void FlushCodeCache(void *start, uint32
478  
479  
480   /*
481 + *  Mutexes
482 + */
483 +
484 + struct B2_mutex {
485 +        int dummy;      //!!
486 + };
487 +
488 + B2_mutex *B2_create_mutex(void)
489 + {
490 +        return new B2_mutex;
491 + }
492 +
493 + void B2_lock_mutex(B2_mutex *mutex)
494 + {
495 + }
496 +
497 + void B2_unlock_mutex(B2_mutex *mutex)
498 + {
499 + }
500 +
501 + void B2_delete_mutex(B2_mutex *mutex)
502 + {
503 +        delete mutex;
504 + }
505 +
506 +
507 + /*
508   *  Interrupt flags (must be handled atomically!)
509   */
510  
# Line 571 | Line 604 | static __saveds void tick_func(void)
604  
605   static __saveds void xpram_func(void)
606   {
607 <        uint8 last_xpram[256];
608 <        memcpy(last_xpram, XPRAM, 256);
607 >        uint8 last_xpram[XPRAM_SIZE];
608 >        memcpy(last_xpram, XPRAM, XPRAM_SIZE);
609  
610          while (xpram_proc_active) {
611                  for (int i=0; i<60 && xpram_proc_active; i++)
612                          Delay(50);              // Only wait 1 second so we quit promptly when xpram_proc_active becomes false
613 <                if (memcmp(last_xpram, XPRAM, 256)) {
614 <                        memcpy(last_xpram, XPRAM, 256);
613 >                if (memcmp(last_xpram, XPRAM, XPRAM_SIZE)) {
614 >                        memcpy(last_xpram, XPRAM, XPRAM_SIZE);
615                          SaveXPRAM();
616                  }
617          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines