~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/rom_patches.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2005-07-30 20:42:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050730204220-1nl1cg2jkjvy63ry
Tags: 0.9.20050730-1
* New upstream CVS snapshot.
* Build-depend on virtual libsdl-dev (not libsdl1.2-dev).
* Invoke init rules also on clean (to separate better from official
  builds).
* Update URL of upstream source in debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  rom_patches.cpp - ROM patches
3
3
 *
4
 
 *  Basilisk II (C) 1997-2002 Christian Bauer
 
4
 *  Basilisk II (C) 1997-2005 Christian Bauer
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
41
41
// Global variables
42
42
uint32 UniversalInfo;           // ROM offset of UniversalInfo
43
43
uint32 PutScrapPatch;           // Mac address of PutScrap() patch
 
44
uint32 GetScrapPatch = 0;       // Mac address of GetScrap() patch
44
45
uint32 ROMBreakpoint = 0;       // ROM offset of breakpoint (0 = disabled, 0x2310 = CritError)
45
46
bool PrintROMInfo = false;      // Flag: print ROM information in PatchROM()
46
47
bool PatchHWBases = true;       // Flag: patch hardware base addresses
1625
1626
        *wp++ = htons(base >> 16);
1626
1627
        *wp = htons(base & 0xffff);
1627
1628
 
 
1629
        // Install GetScrap() patch for clipboard data exchange (the patch is activated by EMUL_OP_INSTALL_DRIVERS)
 
1630
        GetScrapPatch = ROMBaseMac + sony_offset + 0xd00;
 
1631
        base = ROMBaseMac + find_rom_trap(0xa9fd);
 
1632
        wp = (uint16 *)(ROMBaseHost + sony_offset + 0xd00);
 
1633
        *wp++ = htons(M68K_EMUL_OP_GET_SCRAP);
 
1634
        *wp++ = htons(M68K_JMP);
 
1635
        *wp++ = htons(base >> 16);
 
1636
        *wp = htons(base & 0xffff);
 
1637
 
1628
1638
        // Look for double PACK 4 resources
1629
1639
        if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4)) == 0) return false;
1630
1640
        if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4, true)) == 0 && FPUType == 0)