summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/vtlb.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-06-23 16:37:34 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-06-23 16:37:34 +0000
commita4918351e16e335d85d3e2e46a47e303eaf6e03f (patch)
tree978ee9be9d75a221af1ccd2a31e04c6ac4837fa3 /src/emu/cpu/vtlb.c
parentdfb5755f25d7c8f4021db822129dc175cfef9a3e (diff)
Save state support:
* added save state support to the SHARC CPU core * added save state support to the PowerPC recompiler * added save state support to the virtual TLB system * added save state support to the RF5C400 sound core * added save state support to konppc module * added save state support to K056800 host controller * added save state support to the Konami hornet driver Fixed poor default CLUT handling in the voodoo driver
Diffstat (limited to 'src/emu/cpu/vtlb.c')
-rw-r--r--src/emu/cpu/vtlb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emu/cpu/vtlb.c b/src/emu/cpu/vtlb.c
index 921cd01551b..95a6c06554d 100644
--- a/src/emu/cpu/vtlb.c
+++ b/src/emu/cpu/vtlb.c
@@ -38,6 +38,7 @@ struct _vtlb_state
offs_t * live; /* array of live entries by table index */
int * fixedpages; /* number of pages each fixed entry covers */
vtlb_entry * table; /* table of entries by address */
+ vtlb_entry * save; /* cache of live table entries for saving */
cpu_translate_func translate; /* translate function */
};
@@ -76,18 +77,20 @@ vtlb_state *vtlb_alloc(int cpunum, int space, int fixed_entries, int dynamic_ent
/* allocate the entry array */
vtlb->live = malloc_or_die(sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries));
memset(vtlb->live, 0, sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries));
+ state_save_register_item_pointer("vtlb", cpunum * ADDRESS_SPACES + space, vtlb->live, fixed_entries + dynamic_entries);
/* allocate the lookup table */
vtlb->table = malloc_or_die(sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift));
memset(vtlb->table, 0, sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift));
+ state_save_register_item_pointer("vtlb", cpunum * ADDRESS_SPACES + space, vtlb->table, 1 << (vtlb->addrwidth - vtlb->pageshift));
/* allocate the fixed page count array */
if (fixed_entries > 0)
{
vtlb->fixedpages = malloc_or_die(sizeof(vtlb->fixedpages[0]) * fixed_entries);
memset(vtlb->fixedpages, 0, sizeof(vtlb->fixedpages[0]) * fixed_entries);
+ state_save_register_item_pointer("vtlb", cpunum * ADDRESS_SPACES + space, vtlb->fixedpages, fixed_entries);
}
-
return vtlb;
}