ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/CPU_emulline.h
(Generate patch)

Comparing Frodo4/Src/CPU_emulline.h (file contents):
Revision 1.1 by cebix, 2003-07-01T17:16:21Z vs.
Revision 1.5 by cebix, 2004-01-12T15:13:20Z

# Line 1 | Line 1
1   /*
2 < *  CPU_emulline.i - 6510/6502 emulation core (body of
2 > *  CPU_emulline.h - 6510/6502 emulation core (body of
3   *                   EmulateLine() function, the same for
4   *                   both 6510 and 6502)
5   *
6 < *  Frodo (C) 1994-1997,2002 Christian Bauer
6 > *  Frodo (C) 1994-1997,2002-2004 Christian Bauer
7   *
8   *  This program is free software; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by
# Line 758 | Line 758
758  
759                  // Jump/branch group
760                  case 0x4c:      // JMP abs
761 <                        jump(read_adr_abs());
761 >                        adr = read_adr_abs();
762 >                        jump(adr);
763                          ENDOP(3);
764  
765                  case 0x6c:      // JMP (ind)
766                          adr = read_adr_abs();
767 <                        jump(read_byte(adr) | (read_byte((adr + 1) & 0xff | adr & 0xff00) << 8));
767 >                        adr = read_byte(adr) | (read_byte((adr + 1) & 0xff | adr & 0xff00) << 8);
768 >                        jump(adr);
769                          ENDOP(5);
770  
771                  case 0x20:      // JSR abs
# Line 772 | Line 774
774   #else
775                          push_byte(pc+1 >> 8); push_byte(pc+1);
776   #endif
777 <                        jump(read_adr_abs());
777 >                        adr = read_adr_abs();
778 >                        jump(adr);
779                          ENDOP(6);
780  
781                  case 0x60:      // RTS
782                          adr = pop_byte();       // Split because of pop_byte ++sp side-effect
783 <                        jump((adr | pop_byte() << 8) + 1);
783 >                        adr = (adr | pop_byte() << 8) + 1;
784 >                        jump(adr);
785                          ENDOP(6);
786  
787                  case 0x40:      // RTI
788                          pop_flags();
789                          adr = pop_byte();       // Split because of pop_byte ++sp side-effect
790 <                        jump(adr | pop_byte() << 8);
790 >                        adr = adr | pop_byte() << 8;
791 >                        jump(adr);
792                          if (interrupt.intr_any && !i_flag)
793                                  goto handle_int;
794                          ENDOP(6);
# Line 796 | Line 801
801   #endif
802                          push_flags(true);
803                          i_flag = true;
804 <                        jump(read_word(0xfffe));
804 >                        adr = read_word(0xfffe);
805 >                        jump(adr);
806                          ENDOP(7);
807  
808   #if PC_IS_POINTER
# Line 1323 | Line 1329
1329                                  v_flag = (tmp2 ^ a) & 0x40;
1330                                  if ((tmp2 & 0x0f) + (tmp2 & 0x01) > 5)
1331                                          a = a & 0xf0 | (a + 6) & 0x0f;
1332 <                                if (c_flag = ((tmp2 + (tmp2 & 0x10)) & 0x1f0) > 0x50)
1332 >                                if ((c_flag = ((tmp2 + (tmp2 & 0x10)) & 0x1f0) > 0x50) != 0)
1333                                          a += 0x60;
1334                          }
1335                          ENDOP(2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines