MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / lastaddr

Function lastaddr

src/debug.cpp:1423–1439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421}
1422
1423static uae_u32 lastaddr(uae_u32 start)
1424{
1425 int lastbank = currprefs.address_space_24 ? 255 : 65535;
1426
1427 addrbank *ab2 = get_mem_bank_real(start + 1);
1428 uae_u32 flags = ab2->flags & (ABFLAG_RAM | ABFLAG_ROM);
1429 if (start == 0xffffffff) {
1430 flags = ABFLAG_RAM;
1431 }
1432 for (int i = lastbank; i >= 0; i--) {
1433 addrbank *ab = get_mem_bank_real(i << 16);
1434 if (ab->baseaddr && (ab->flags & (ABFLAG_RAM | ABFLAG_ROM)) == flags) {
1435 return (i + 1) << 16;
1436 }
1437 }
1438 return 0;
1439}
1440
1441static uae_u32 nextaddr_ab_flags = ABFLAG_RAM;
1442static uae_u32 nextaddr_ab_flags_mask = ABFLAG_RAM;

Callers 2

searchmemFunction · 0.85
find_eaFunction · 0.85

Calls 1

get_mem_bank_realFunction · 0.85

Tested by

no test coverage detected