changeset 323:230decbfe9be trunk

[svn] - what would we have ever done without Aerdan?
author nenolod
date Thu, 30 Nov 2006 23:02:05 -0800
parents 32dad60229d6
children d49c3049fe5e
files ChangeLog src/console/Hes_Emu.cxx src/console/Kss_Emu.cxx src/console/Nsf_Emu.cxx src/console/Sap_Emu.cxx
diffstat 5 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 30 22:57:16 2006 -0800
+++ b/ChangeLog	Thu Nov 30 23:02:05 2006 -0800
@@ -1,3 +1,11 @@
+2006-12-01 06:57:16 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [708]
+  - make this more robust
+  
+  trunk/src/console/Audacious_Driver.cxx |   10 +++-------
+  1 file changed, 3 insertions(+), 7 deletions(-)
+
+
 2006-12-01 06:50:44 +0000  William Pitcock <nenolod@nenolod.net>
   revision [706]
   - fix is_our_file() behaviour
--- a/src/console/Hes_Emu.cxx	Thu Nov 30 22:57:16 2006 -0800
+++ b/src/console/Hes_Emu.cxx	Thu Nov 30 23:02:05 2006 -0800
@@ -237,7 +237,7 @@
 	vdp.next_vbl  = 0;
 	
 	ram [0x1FF] = (idle_addr - 1) >> 8;
-	ram [0x1FE] = (idle_addr - 1);
+	ram [0x1FE] = (idle_addr - 1) & 0xFF;
 	r.sp = 0xFD;
 	r.pc = get_le16( header_.init_addr );
 	r.a  = track;
--- a/src/console/Kss_Emu.cxx	Thu Nov 30 22:57:16 2006 -0800
+++ b/src/console/Kss_Emu.cxx	Thu Nov 30 23:02:05 2006 -0800
@@ -235,7 +235,7 @@
 		sn->reset();
 	r.sp = 0xF380;
 	ram [--r.sp] = idle_addr >> 8;
-	ram [--r.sp] = idle_addr;
+	ram [--r.sp] = idle_addr & 0xFF;
 	r.b.a = track;
 	r.pc = get_le16( header_.init_addr );
 	next_play = play_period;
@@ -384,7 +384,7 @@
 				}
 				
 				ram [--r.sp] = idle_addr >> 8;
-				ram [--r.sp] = idle_addr;
+				ram [--r.sp] = idle_addr & 0xFF;
 				r.pc = get_le16( header_.play_addr );
 			}
 		}
--- a/src/console/Nsf_Emu.cxx	Thu Nov 30 22:57:16 2006 -0800
+++ b/src/console/Nsf_Emu.cxx	Thu Nov 30 23:02:05 2006 -0800
@@ -472,7 +472,7 @@
 	
 	saved_state.pc = badop_addr;
 	low_mem [0x1FF] = (badop_addr - 1) >> 8;
-	low_mem [0x1FE] = (badop_addr - 1);
+	low_mem [0x1FE] = (badop_addr - 1) & 0xFF;
 	r.sp = 0xFD;
 	r.pc = init_addr;
 	r.a  = track;
@@ -523,7 +523,7 @@
 				
 				r.pc = play_addr;
 				low_mem [0x100 + r.sp--] = (badop_addr - 1) >> 8;
-				low_mem [0x100 + r.sp--] = (badop_addr - 1);
+				low_mem [0x100 + r.sp--] = (badop_addr - 1) & 0xFF;
 			}
 		}
 	}
--- a/src/console/Sap_Emu.cxx	Thu Nov 30 22:57:16 2006 -0800
+++ b/src/console/Sap_Emu.cxx	Thu Nov 30 23:02:05 2006 -0800
@@ -292,7 +292,7 @@
 		r.sp = 0xFF; // pop extra byte off
 	mem [0x100 + r.sp--] = high_byte; // some routines use RTI to return
 	mem [0x100 + r.sp--] = high_byte;
-	mem [0x100 + r.sp--] = idle_addr - 1;
+	mem [0x100 + r.sp--] = (idle_addr - 1) & 0xFF;
 }
 
 void Sap_Emu::run_routine( sap_addr_t addr )