Commit graph

149 commits

Author SHA1 Message Date
Emmanuel Anne
24366e2462 missed some more cycle usage in mame081 ! 2019-12-11 16:27:24 +01:00
Karl Stenerud
3e0547b1ae
Merge pull request #48 from zelurker/conf
Conf
2019-12-01 10:59:05 +01:00
Emmanuel Anne
e5dcb599ba add some doc about MUSASHI_CNF 2019-11-30 18:21:37 +01:00
Karl Stenerud
6be1436e6e
Merge pull request #46 from philpem/philpem/fix_overlapping_memcpy
Use memmove instead of memcpy when the buffer pointers overlap
2019-11-30 16:00:56 +01:00
Karl Stenerud
4fc09e23d5
Merge pull request #47 from philpem/philpem/buserror
Add bus error emulation support
2019-11-30 16:00:03 +01:00
Philip Pemberton
0c6b08b7f1 use CPU_RUN_MODE instead of BUS_ERROR_OCCURRED 2019-11-27 16:47:11 +00:00
Philip Pemberton
27787fbad6 remove unused m68ki_bus_error_return_jmp_buf 2019-11-27 16:26:52 +00:00
Philip Pemberton
3a2c230e22 add missing int i 2019-11-27 16:09:33 +00:00
Philip Pemberton
aa603f5e29 always include setjmp 2019-11-27 16:08:04 +00:00
Philip Pemberton
8143681fd8 add bus error emulation 2019-11-27 16:06:53 +00:00
Philip Pemberton
1673c69814 fix memcpy on overlapping region
On some architectures, memcpy uses optimisations which break when the
buffer pointers overlap. Where buffers overlap, memmove should be used
instead.
2019-11-27 15:32:46 +00:00
Emmanuel Anne
f3c3022454 allow to set the config file from a define
warning the quotes must be escaped :
gcc -DMUSASHI_CNF=\"myconf.h\" ...
2019-11-06 18:36:18 +01:00
Karl Stenerud
5a93a6d326 Updated example m68kconf.h, and added fpu code to makefile 2019-11-05 20:25:43 +01:00
Karl Stenerud
cb1c759428 Support MSVC noreturn 2019-11-04 18:56:29 +01:00
Karl Stenerud
b1cbb3ce68 Small fixes for MacOS 2019-11-03 21:53:34 +01:00
Karl Stenerud
8266fbe873 Removed INLINE and replaced it with static inline because it's part of the spec since c9x.
Beefed up the warnings and cleared them up.
m68kfpu.c is no longer included by m68kcpu.c.
Removed a bunch of internal function forward declarations, except for those used by macros.
Converted CRLF line endings to LF.
2019-11-03 19:33:07 +01:00
Karl Stenerud
890efa8bf7 Add C++ guards to header files 2019-11-03 12:51:12 +01:00
Karl Stenerud
c1ebef6515
Merge pull request #41 from arnaud-carre/master
fixed disassembly (completely broken in !g_rawop mode )
2019-10-06 12:47:52 -07:00
arnaud
ea9dd8ca0a fixed disassembly (completely broken in !g_rawop mode ) 2019-10-05 18:36:34 +02:00
Karl Stenerud
474c267b46
Merge pull request #38 from domesticmouse/master
Hide generated output from git
2019-09-12 22:52:08 -07:00
Brett Morgan
3c50276644 Hide generated output from git 2019-09-13 15:28:48 +10:00
Karl Stenerud
a9dffa08ad
Merge pull request #36 from zelurker/master
Illegal instruction callback
2019-09-06 23:24:40 -07:00
Karl Stenerud
336331a880
Merge pull request #37 from zelurker/doc
more info in the readme
2019-09-06 23:23:24 -07:00
Emmanuel Anne
a8bf1d8161 more info in the readme 2019-09-06 21:31:49 +02:00
Emmanuel Anne
77818862e7 some more info in the readme 2019-09-06 21:09:44 +02:00
Emmanuel Anne
241d1ef7f0 illegal instruction callback 2019-09-06 13:48:36 +02:00
Emmanuel Anne
dbe9c95caf get rid of an unused variable 2019-09-06 13:26:42 +02:00
Karl Stenerud
b56ba664c4
Merge pull request #35 from zelurker/master
a few patches from mame
2019-09-06 03:26:48 -07:00
Emmanuel Anne
2c0f575be8 from dgen fix M68K_REG_SR handling in m68k_set_reg()
m68k_set_reg() is used to set registers to a given value. Modifying the
status register should not check for interrupts and especially not update
the stack pointer.

Fixes various freezes happening when loading save states or cycling between
CPU emulators.
2019-09-05 12:07:37 +02:00
Aaron Giles
f0d95c3dee Fixed handling of interrupts when the CPU was in the STOP state. 2019-09-05 06:09:45 +02:00
Aaron Giles
0a75e6e85e Changed 68000 interrupts to only trigger during execution.
This means that multiple changes without any execution will be seen as atomic. It also means that PULSE_LINE no longer works for signalling IRQs.

Added checks in the debug build to catch people who try to use
PULSE_LINE for non-NMI and non-RESET input lines on CPUs that no
longer support direct interrupt generation. Over time expect this
list to increase.
2019-09-05 05:59:47 +02:00
Emmanuel Anne
6fcf2d4396 const & dasm stuff 2019-09-05 05:55:32 +02:00
Aaron Giles
5d9df94233 Fix m68k irq line support.
Before this patch a:
      cpunum_set_input_line(5, ASSERT_LINE);
      cpunum_set_input_line(3, ASSERT_LINE);
      cpunum_set_input_line(3, CLEAR_LINE);

    loses the state of line 5.  This patch fixes it by adding an explicit
    but optional "virtual irq line" support to the 68k interface.

    Fix m68k interrupt handling by some drivers.

    Clearing the NMI line to clear all the IRQ lines worked, but it just
    doesn't make sense.  Now that the irq lines are really independant,
    the handling can be simplified.
2019-09-05 05:55:21 +02:00
Aaron Giles
6ea3eaa77c Fixed 68000 prefetching operation.
Changed slapstic management to always install an opbase handler to more
aggressively catch code executing in the slapstic region. Updated all
drivers to separate the slapstic region of ROM into a different ROM
section from the fixed ROM.
2019-09-05 05:23:50 +02:00
Emmanuel Anne
438d1f4c14 a few quirks with the new m68ki_instr_hook format 2019-09-05 00:00:17 +02:00
Emmanuel Anne
b2ed988978 mame123: const, formating, and fix for reset instruction 2019-09-04 23:50:18 +02:00
Emmanuel Anne
25e031e169 mame120: version update to 3.31 2019-09-04 23:21:26 +02:00
Emmanuel Anne
bb4ca57463 mame115: u/sint32 definition update, movec for 040 2019-09-04 23:08:15 +02:00
Emmanuel Anne
abc09c9056 cmpild, tas and rte callbacks (mame110) 2019-09-04 22:45:50 +02:00
Emmanuel Anne
dcdff4d4cb restored the example so that it can be compiled in linux
it makes a real test with linking, better than the basic makefile of the
parent directory.
2019-09-04 21:20:54 +02:00
Emmanuel Anne
a9a9bba50b fpu emulation mainly (from mame98 to mame106)
I removed the mame specific stuff from m68kfpu.c to make it portable
again
2019-09-04 21:15:31 +02:00
Emmanuel Anne
de46c037cb mame098: support for 68040 ! 2019-09-04 19:05:11 +02:00
Emmanuel Anne
dad4a52847 basic Makefile to quickly test things 2019-09-04 18:39:16 +02:00
Emmanuel Anne
9667752d8d from mame088 to mame097
mainly disassembler stuff and mainly for mame only, but I keep that to
make applying later patches easier
2019-09-04 18:39:08 +02:00
Emmanuel Anne
d506471941 Revert "Fix MOVEM cycle-counts"
This reverts commit 577966a9dc.
2019-09-04 14:42:20 +02:00
Emmanuel Anne
a30886f11c Revert "Fix spelling, add note about unverified 020-counts"
This reverts commit 84df9a6300.
2019-09-04 14:41:24 +02:00
Emmanuel Anne
5bcffd74b8 Revert "Fix size of ANDI, EORI, ORI"
This reverts commit a16bd2bb28.
2019-09-04 14:40:34 +02:00
Karl Stenerud
c641acd9aa
Merge pull request #33 from tyfkda/feature/warning
Fix loop condition
2019-02-10 09:27:11 +01:00
tyfkda
521059b38b Fix loop condition
`name` field in `struct opcode_struct` is an array,
so the condition is always false.

```sh
$ gcc -o m68kmake -I. -Wall -Werror -DM68K_COMPILE_FOR_MAME=0 m68kmake.c
m68kmake.c:652:36: error: comparison of array 'op->name' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
        for(op = g_opcode_input_table;op->name != NULL;op++)
                                      ~~~~^~~~    ~~~~
m68kmake.c:668:36: error: comparison of array 'op->name' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare]
        for(op = g_opcode_input_table;op->name != NULL;op++)
                                      ~~~~^~~~    ~~~~
2 errors generated.
```
2019-01-13 12:51:50 +09:00
Karl Stenerud
fe93f3a823
Merge pull request #32 from dfawcus/file-modes
Correct file modes
2018-07-13 11:43:46 -07:00