int MemReadLong (p68K pos) { #ifdef M68K_DEBUG BOUNDS_CHECK (pos,4); #endif /* M68K_DEBUG */ return do_get_mem_long ((u32 *)(m68kram+pos)); }
static uae_u32 REGPARAM2 a3000hmem_lget (uaecptr addr) { uae_u32 *m; addr &= a3000hmem_mask; m = (uae_u32 *)(a3000hmemory + addr); return do_get_mem_long (m); }
uae_u32 REGPARAM2 bogomem_lget (uaecptr addr) { uae_u32 *m; addr -= bogomem_start & bogomem_mask; addr &= bogomem_mask; m = (uae_u32 *)(bogomemory + addr); return do_get_mem_long (m); }
static uae_u32 REGPARAM2 extendedkickmem_lget (uaecptr addr) { uae_u32 *m; addr -= extendedkickmem_start & extendedkickmem_mask; addr &= extendedkickmem_mask; m = (uae_u32 *)(extendedkickmemory + addr); return do_get_mem_long (m); }
uae_u32 REGPARAM2 kickmem_lget (uaecptr addr) { uae_u32 *m; addr -= kickmem_start & kickmem_mask; addr &= kickmem_mask; m = (uae_u32 *)(kickmemory + addr); return swab_l(do_get_mem_long (m)); }
uae_u32 REGPARAM2 z3fastmem_lget (uaecptr addr) { uae_u8 *m; addr -= z3fastmem_start & z3fastmem_mask; addr &= z3fastmem_mask; m = z3fastmem + addr; return do_get_mem_long ((uae_u32 *)m); }
uae_u32 REGPARAM2 filesys_lget (uaecptr addr) { uae_u8 *m; addr -= filesys_start & 65535; addr &= 65535; m = filesysory + addr; return do_get_mem_long ((uae_u32 *)m); }
uae_u32 REGPARAM2 fastmem_lget (uaecptr addr) { uae_u8 *m; addr -= fastmem_start & fastmem_mask; addr &= fastmem_mask; m = fastmemory + addr; return do_get_mem_long ((uae_u32 *)m); }
uae_u32 REGPARAM2 chipmem_lget (uaecptr addr) { uae_u32 *m; addr -= chipmem_start & chipmem_mask; addr &= chipmem_mask; m = (uae_u32 *)(chipmemory + addr); return swab_l(do_get_mem_long (m)); }
static a_inode *aino_from_buf (a_inode *base, uae_u8 *buf, int *winmode) { uae_u32 mode; a_inode *aino = xcalloc (a_inode, 1); uae_u8 *buf2; TCHAR *s; buf2 = buf + 604; mode = do_get_mem_long ((uae_u32 *)(buf + 1)); buf += 5; if (buf2[0]) { aino->aname = my_strdup ((TCHAR*)buf2); } else { aino->aname = au_fs ((char*)buf); } buf += 257; buf2 += 257 * 2; if (buf2[0]) { aino->nname = build_nname (base->nname, (TCHAR*)buf2); } else { s = au_fs ((char*)buf); aino->nname = build_nname (base->nname, s); xfree (s); } buf += 257; aino->comment = *buf != '\0' ? my_strdup_ansi ((char*)buf) : 0; buf += 81; aino->amigaos_mode = mode; *winmode = do_get_mem_long ((uae_u32 *)buf); aino->dir = ((*winmode) & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0; *winmode &= FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN; aino->has_dbentry = 0; aino->dirty = 0; aino->db_offset = 0; if((mode = GetFileAttributesSafe (aino->nname)) == INVALID_FILE_ATTRIBUTES) { write_log (_T("xGetFileAttributes('%s') failed! error=%d, aino=%p\n"), aino->nname, GetLastError (), aino); return aino; } aino->dir = (mode & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0; return aino; }
uae_u32 REGPARAM2 bogomem_lget (uaecptr addr) { uae_u32 *m; addr -= bogomem_start /*& bogomem_mask*/; #ifdef SAFE_MEMORY_ACCESS addr &= bogomem_mask; #endif m = (uae_u32 *)(bogomemory + addr); return do_get_mem_long (m); }
uae_u32 REGPARAM2 chipmem_lget (uaecptr addr) { uae_u32 *m; // addr -= chipmem_start /*& chipmem_mask*/; #ifdef SAFE_MEMORY_ACCESS addr &= chipmem_mask; #endif m = (uae_u32 *)(chipmemory + addr); return do_get_mem_long(m); }
uae_u32 REGPARAM2 extendedkickmem_lget (uaecptr addr) { #ifdef DEBUG_MEMORY dbgf("extendedkickmem_lget 0x%X\n",addr); #endif uae_u32 *m; addr -= extendedkickmem_start & extendedkickmem_mask; addr &= extendedkickmem_mask; m = (uae_u32 *)(extendedkickmemory + addr); return swab_l(do_get_mem_long (m)); }
uae_u32 REGPARAM2 a3000mem_lget (uaecptr addr) { #ifdef DEBUG_MEMORY dbgf("a3000mem_lget 0x%X\n",addr); #endif uae_u32 *m; addr -= a3000mem_start & a3000mem_mask; addr &= a3000mem_mask; m = (uae_u32 *)(a3000memory + addr); return SWAP_L(do_get_mem_long (m)); }
static uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr) { uae_u32 *m; addr -= chipmem_start & chipmem_mask; addr &= chipmem_mask; m = (uae_u32 *)(chipmemory + addr); if (ISILLEGAL (addr)) enforcer_display_hit ("LONG READ from", GET_PC, addr); return do_get_mem_long (m); }
static uae_u32 REGPARAM2 blizzardf0_lget(uaecptr addr) { #ifdef JIT special_mem |= S_READ; #endif uae_u32 *m; //write_log(_T("F0 LONGGET %08x\n"), addr); regs.memory_waitstate_cycles += F0_WAITSTATES * 6; addr &= blizzardf0_bank.mask; m = (uae_u32 *)(blizzardf0_bank.baseaddr + addr); return do_get_mem_long(m); }
static uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr) { uae_u32 *m; addr -= chipmem_start_addr & chipmem_bank.mask; addr &= chipmem_bank.mask; m = (uae_u32 *)(chipmem_bank.baseaddr + addr); if (ISILLEGAL_LONG (addr)) { enforcer_display_hit (_T("LONG READ from"), m68k_getpc (), addr); if (enforcermode & 1) set_special (SPCFLAG_TRAP); } return do_get_mem_long (m); }
static uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr) { uae_u32 *m; addr -= chipmem_start & chipmem_mask; addr &= chipmem_mask; m = (uae_u32 *)(chipmemory + addr); if (ISILLEGAL_LONG (addr)) { enforcer_display_hit (_T("LONG READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr); if (enforcermode & 1) set_special (SPCFLAG_TRAP); } return do_get_mem_long (m); }
/* For an a_inode we have newly created based on a filename we found on the * native fs, fill in information about this file/directory. */ int fsdb_fill_file_attrs (a_inode *base, a_inode *aino) { int mode, winmode, oldamode; uae_u8 fsdb[UAEFSDB2_LEN]; int reset = 0; if((mode = GetFileAttributesSafe (aino->nname)) == INVALID_FILE_ATTRIBUTES) { write_log (_T("GetFileAttributes('%s') failed! error=%d, aino=%p dir=%d\n"), aino->nname, GetLastError(), aino, aino->dir); return 0; } aino->dir = (mode & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0; mode &= FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN; if ((base->volflags & MYVOLUMEINFO_STREAMS) && read_uaefsdb (aino->nname, NULL, fsdb)) { aino->amigaos_mode = do_get_mem_long ((uae_u32 *)(fsdb + 1)); xfree (aino->comment); aino->comment = NULL; if (fsdb[5 + 2 * 257]) aino->comment = my_strdup_ansi ((char*)fsdb + 5 + 2 * 257); xfree (aino_from_buf (base, fsdb, &winmode)); if (winmode == mode) /* no Windows-side editing? */ return 1; write_log (_T("FS: '%s' protection flags edited from Windows-side\n"), aino->nname); reset = 1; /* edited from Windows-side -> use Windows side flags instead */ } oldamode = aino->amigaos_mode; aino->amigaos_mode = A_FIBF_EXECUTE | A_FIBF_READ; if (!(FILE_ATTRIBUTE_ARCHIVE & mode)) aino->amigaos_mode |= A_FIBF_ARCHIVE; if (!(FILE_ATTRIBUTE_READONLY & mode)) aino->amigaos_mode |= A_FIBF_WRITE | A_FIBF_DELETE; if (FILE_ATTRIBUTE_SYSTEM & mode) aino->amigaos_mode |= A_FIBF_PURE; if (FILE_ATTRIBUTE_HIDDEN & mode) aino->amigaos_mode |= A_FIBF_HIDDEN; aino->amigaos_mode = filesys_parse_mask(aino->amigaos_mode); aino->amigaos_mode |= oldamode & A_FIBF_SCRIPT; if (reset && (base->volflags & MYVOLUMEINFO_STREAMS)) { create_uaefsdb (aino, fsdb, mode); write_uaefsdb (aino->nname, fsdb); } return 1; }
static a_inode *aino_from_buf (a_inode *base, uae_u8 *buf, long off) { uae_u32 mode; a_inode *aino = xcalloc (a_inode, 1); mode = do_get_mem_long ((uae_u32 *)(buf + 1)); buf += 5; aino->aname = my_strdup ((char*)buf); buf += 257; aino->nname = build_nname (base->nname, (char*)buf); buf += 257; aino->comment = *buf != '\0' ? my_strdup ((char*)buf) : 0; fsdb_fill_file_attrs (base, aino); aino->amigaos_mode = mode; aino->has_dbentry = 1; aino->dirty = 0; aino->db_offset = off; return aino; }
/** * Read long/word/byte from memory. * NOTE - value will be converted to 68000 endian */ Uint32 STMemory_Read ( Uint32 addr , int size ) { addrbank *pBank; Uint8 *p; //printf ( "mem direct read %x %d\n" , addr , size ); pBank = &get_mem_bank ( addr ); if ( pBank->baseaddr == NULL ) return 0; /* No real memory, return 0 */ addr -= pBank->start & pBank->mask; addr &= pBank->mask; p = pBank->baseaddr + addr; if ( size == 4 ) return do_get_mem_long ( p ); else if ( size == 2 ) return (Uint32)do_get_mem_word ( p ); else return (Uint32)*p; }
static uae_u32 mem_rom_lget(uaecptr addr) { // if ((addr<0x2000) && (SCR_ROM_overlay)) {do_get_mem_long(NEXTRam + 0x03FFE000 +addr);} addr &= NEXT_EPROM_MASK; return do_get_mem_long(ROMmemory + addr); }
static uae_u32 mem_ram_bank3_lget(uaecptr addr) { addr &= NEXT_ram_bank3_mask; return do_get_mem_long(NEXTRam + addr); }
static uae_u32 mem_video_lget(uaecptr addr) { addr &= NEXT_VRAM_MASK; return do_get_mem_long(NEXTVideo + addr); }