EmulatorJS/test_rom_cache.html
2025-10-30 14:55:40 +11:00

38 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Test ROM Cache</title>
<script src="data/loader.js"></script>
</head>
<body>
<div style="width: 640px; height: 480px; max-width: 100%">
<div id="game"></div>
</div>
<script>
// Test with a simple ROM to see if it gets cached
EJS_player = '#game';
EJS_core = 'nes'; // Simple NES core
EJS_gameUrl = 'https://www.emulatorjs.org/roms/nes/Homebrew/PinBot_Deluxe_Demo.nes';
EJS_pathtodata = 'data/';
// Monitor console logs to see caching behavior
console.log('Starting EmulatorJS test for ROM caching...');
// Add event listener to check cache after ROM is loaded
window.addEventListener('EJS_onGameStart', () => {
console.log('Game started, checking cache...');
// Open developer tools and check the decompression cache
setTimeout(() => {
if (window.EJS_player_instance && window.EJS_player_instance.storageCache) {
console.log('Cache instance available, checking entries...');
} else {
console.log('No cache instance found');
}
}, 2000);
});
</script>
</body>
</html>