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

Comparing BasiliskII/src/BeOS/main_beos.cpp (file contents):
Revision 1.7 by cebix, 2001-02-02T20:52:57Z vs.
Revision 1.11 by cebix, 2001-10-07T19:50:20Z

# Line 176 | Line 176 | void BasiliskII::ReadyToRun(void)
176                  delete_area(old_rom_area);
177  
178          // Read preferences
179 <        PrefsInit(0, NULL);
179 >        int argc = 0;
180 >        char **argv = NULL;
181 >        PrefsInit(argc, argv);
182  
183          // Init system routines
184          SysInit();
# Line 241 | Line 243 | void BasiliskII::StartEmulator(void)
243          RAMBaseHost = (uint8 *)0x10000000;
244          ram_area = create_area(RAM_AREA_NAME, (void **)&RAMBaseHost, B_BASE_ADDRESS, RAMSize, B_NO_LOCK, B_READ_AREA | B_WRITE_AREA);
245          if (ram_area < 0) {
246 <                ErrorAlert(GetString(STR_NO_RAM_AREA_ERR));
246 >                ErrorAlert(STR_NO_RAM_AREA_ERR);
247                  PostMessage(B_QUIT_REQUESTED);
248                  return;
249          }
# Line 251 | Line 253 | void BasiliskII::StartEmulator(void)
253          try {
254                  init_rom();
255          } catch (area_error) {
256 <                ErrorAlert(GetString(STR_NO_ROM_AREA_ERR));
256 >                ErrorAlert(STR_NO_ROM_AREA_ERR);
257                  PostMessage(B_QUIT_REQUESTED);
258                  return;
259          } catch (file_open_error) {
260 <                ErrorAlert(GetString(STR_NO_ROM_FILE_ERR));
260 >                ErrorAlert(STR_NO_ROM_FILE_ERR);
261                  PostMessage(B_QUIT_REQUESTED);
262                  return;
263          } catch (file_read_error) {
264 <                ErrorAlert(GetString(STR_ROM_FILE_READ_ERR));
264 >                ErrorAlert(STR_ROM_FILE_READ_ERR);
265                  PostMessage(B_QUIT_REQUESTED);
266                  return;
267          } catch (rom_size_error) {
268 <                ErrorAlert(GetString(STR_ROM_SIZE_ERR));
268 >                ErrorAlert(STR_ROM_SIZE_ERR);
269                  PostMessage(B_QUIT_REQUESTED);
270                  return;
271          }
# Line 467 | Line 469 | void FlushCodeCache(void *start, uint32
469  
470  
471   /*
472 + *  Mutexes
473 + */
474 +
475 + struct B2_mutex {
476 +        int dummy;      //!!
477 + };
478 +
479 + B2_mutex *B2_create_mutex(void)
480 + {
481 +        return new B2_mutex;
482 + }
483 +
484 + void B2_lock_mutex(B2_mutex *mutex)
485 + {
486 + }
487 +
488 + void B2_unlock_mutex(B2_mutex *mutex)
489 + {
490 + }
491 +
492 + void B2_delete_mutex(B2_mutex *mutex)
493 + {
494 +        delete mutex;
495 + }
496 +
497 +
498 + /*
499   *  Interrupt flags (must be handled atomically!)
500   */
501  
# Line 521 | Line 550 | status_t BasiliskII::tick_func(void *arg
550  
551   status_t BasiliskII::xpram_func(void *arg)
552   {
553 <        uint8 last_xpram[256];
554 <        memcpy(last_xpram, XPRAM, 256);
553 >        uint8 last_xpram[XPRAM_SIZE];
554 >        memcpy(last_xpram, XPRAM, XPRAM_SIZE);
555  
556          while (((BasiliskII *)arg)->xpram_thread_active) {
557                  snooze(60*1000000);
558 <                if (memcmp(last_xpram, XPRAM, 256)) {
559 <                        memcpy(last_xpram, XPRAM, 256);
558 >                if (memcmp(last_xpram, XPRAM, XPRAM_SIZE)) {
559 >                        memcpy(last_xpram, XPRAM, XPRAM_SIZE);
560                          SaveXPRAM();
561                  }
562          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines