| 5782 | } |
| 5783 | |
| 5784 | static uaecptr get_base (const uae_char *name, int offset) |
| 5785 | { |
| 5786 | uaecptr v = get_long_debug (4); |
| 5787 | addrbank *b = &get_mem_bank(v); |
| 5788 | |
| 5789 | if (!b || !b->check (v, 400) || !(b->flags & ABFLAG_RAM)) |
| 5790 | return 0; |
| 5791 | v += offset; |
| 5792 | while ((v = get_long_debug (v))) { |
| 5793 | uae_u32 v2; |
| 5794 | uae_u8 *p; |
| 5795 | b = &get_mem_bank (v); |
| 5796 | if (!b || !b->check (v, 32) || (!(b->flags & ABFLAG_RAM) && !(b->flags & ABFLAG_ROMIN))) |
| 5797 | goto fail; |
| 5798 | v2 = get_long_debug (v + 10); // name |
| 5799 | b = &get_mem_bank (v2); |
| 5800 | if (!b || !b->check (v2, 20)) |
| 5801 | goto fail; |
| 5802 | if ((b->flags & ABFLAG_ROM) || (b->flags & ABFLAG_RAM) || (b->flags & ABFLAG_ROMIN)) { |
| 5803 | p = get_real_address_debug(v2); |
| 5804 | if (!memcmp (p, name, strlen (name) + 1)) |
| 5805 | return v; |
| 5806 | } |
| 5807 | } |
| 5808 | return 0; |
| 5809 | fail: |
| 5810 | return 0xffffffff; |
| 5811 | } |
| 5812 | |
| 5813 | static TCHAR *getfrombstr(uaecptr pp) |
| 5814 | { |
no test coverage detected