Skip to content

Commit

Permalink
Update to CrabEmu r261
Browse files Browse the repository at this point in the history
  • Loading branch information
clobber committed Jul 1, 2016
1 parent 83c3edc commit d1b1e67
Show file tree
Hide file tree
Showing 15 changed files with 1,686 additions and 90 deletions.
2 changes: 1 addition & 1 deletion CrabEmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright (C) 2009, 2012, 2014 Lawrence Sebald
CrabEmu is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
CrabEmu is distributed in the hope that it will be useful,
Expand Down
6 changes: 6 additions & 0 deletions CrabEmu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@
878700E21B675EB4006841C9 /* nesmapper9.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = nesmapper9.c; sourceTree = "<group>"; };
878700E31B675EB4006841C9 /* nesmapper66.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = nesmapper66.c; sourceTree = "<group>"; };
878700E41B675EF0006841C9 /* console.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = console.h; sourceTree = "<group>"; };
87ACB6E41D26C1F600138B7E /* CrabZ80_gbmacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CrabZ80_gbmacros.h; sourceTree = "<group>"; };
87ACB6E51D26C1F600138B7E /* CrabZ80gbops.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CrabZ80gbops.h; sourceTree = "<group>"; };
87ACB6E61D26C1F700138B7E /* CrabZ80gbopsCB.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CrabZ80gbopsCB.h; sourceTree = "<group>"; };
8D5B49B6048680CD000E48DA /* CrabEmu.oecoreplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CrabEmu.oecoreplugin; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9443D39B1715F2EB00E452AC /* colecomem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = colecomem.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -495,6 +498,9 @@
9443D3FF1715F31000E452AC /* CrabZ80_tables.h */,
9443D4001715F31000E452AC /* CrabZ80d.c */,
9443D4011715F31000E452AC /* CrabZ80d.h */,
87ACB6E41D26C1F600138B7E /* CrabZ80_gbmacros.h */,
87ACB6E51D26C1F600138B7E /* CrabZ80gbops.h */,
87ACB6E61D26C1F700138B7E /* CrabZ80gbopsCB.h */,
9443D4021715F31000E452AC /* CrabZ80ops.h */,
9443D4031715F31000E452AC /* CrabZ80opsCB.h */,
9443D4041715F31000E452AC /* CrabZ80opsDD-FD.h */,
Expand Down
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundleSignature</key>
<string>OpEm</string>
<key>CFBundleVersion</key>
<string>0.2.1.256</string>
<string>0.2.1.261</string>
<key>NSPrincipalClass</key>
<string>OEGameCoreController</string>
<key>OEGameCoreClass</key>
Expand Down
8 changes: 7 additions & 1 deletion console.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
This file is part of CrabEmu.
Copyright (C) 2014, 2015 Lawrence Sebald
Copyright (C) 2014, 2015, 2016 Lawrence Sebald
CrabEmu is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
Expand Down Expand Up @@ -36,6 +36,12 @@ CLINKAGE
/* 7 left blank for now... */
#define CONSOLE_CHIP8 8 /* Chip-8 "Console" */

/* Region codes. */
#define REGION_NONE 0x00
#define REGION_JAPAN 0x01
#define REGION_US 0x02
#define REGION_EUROPE 0x04

/* This structure is meant to provide an abstraction of a console, such that
there can be less console-specific code up at the GUI level. Rignt now, this
doesn't take care of everything, but that might eventually change... Each
Expand Down
18 changes: 9 additions & 9 deletions consoles/colecovision/colecovision.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2014 Lawrence Sebald
CrabEmu is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
CrabEmu is distributed in the hope that it will be useful,
Expand Down Expand Up @@ -103,18 +103,18 @@ colecovision_t colecovision_cons = {
&tms9918a_vdp_activeframe,
NULL, /* save_cheats */
#ifndef _arch_dreamcast
&coleco_scanline,
&coleco_single_step,
&coleco_finish_frame,
&coleco_finish_scanline,
&coleco_scanline,
&coleco_single_step,
&coleco_finish_frame,
&coleco_finish_scanline,
#else
NULL,
NULL,
NULL,
NULL,
#endif
&coleco_current_scanline,
&coleco_cycles_left,
&coleco_current_scanline,
&coleco_cycles_left,
NULL /* set_control */
}
};
Expand Down Expand Up @@ -148,7 +148,7 @@ int coleco_init(int video_system) {

for(i = 0; i < PAL_LINES_PER_FRAME; ++i) {
psg_samples[i] = (uint32) (tmp * (i + 1)) -
(uint32) (tmp * i);
(uint32) (tmp * i);
}

/* We need 882 samples per frame @ 44100 Hz, 50fps. */
Expand Down Expand Up @@ -308,7 +308,7 @@ void coleco_button_released(int player, int button) {
}

#ifndef _arch_dreamcast
static __INLINE__ int update_sound(int16 buf[], int start, int line) {
static __INLINE__ int update_sound(int16 buf[], int start, int line) {
if(sms_psg_enabled)
sn76489_execute_samples(&psg, buf + start, psg_samples[line]);
else
Expand Down
4 changes: 2 additions & 2 deletions consoles/sms/mappers.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
This file is part of CrabEmu.
Copyright (C) 2008, 2012 Lawrence Sebald
Copyright (C) 2008, 2012, 2015 Lawrence Sebald
CrabEmu is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
CrabEmu is distributed in the hope that it will be useful,
Expand Down
6 changes: 3 additions & 3 deletions consoles/sms/sms.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright (C) 2005, 2007, 2009, 2012, 2014 Lawrence Sebald
CrabEmu is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
CrabEmu is distributed in the hope that it will be useful,
Expand Down Expand Up @@ -95,8 +95,8 @@ extern int sms_read_state(FILE *fp);
#define SMS_TH_MASK 0xC000

/* Region types */
#define SMS_REGION_DOMESTIC 0x01
#define SMS_REGION_EXPORT 0x02
#define SMS_REGION_DOMESTIC REGION_JAPAN
#define SMS_REGION_EXPORT REGION_US

/* Video Standards */
#define SMS_VIDEO_NTSC VIDEO_NTSC
Expand Down
4 changes: 2 additions & 2 deletions consoles/sms/smsz80.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Copyright (C) 2005, 2006, 2007, 2008, 2009 Lawrence Sebald
CrabEmu is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.
CrabEmu is distributed in the hope that it will be useful,
Expand Down Expand Up @@ -34,7 +34,7 @@ int sms_z80_init(void) {
return -1;
}

CrabZ80_init(cpuz80);
CrabZ80_init(cpuz80, CRABZ80_CPU_Z80);
CrabZ80_reset(cpuz80);

CrabZ80_set_portwrite(cpuz80, sms_port_write);
Expand Down
Loading

0 comments on commit d1b1e67

Please sign in to comment.