Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PUAE
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
PUAE
Commits
32a6b42d
Commit
32a6b42d
authored
Sep 07, 2010
by
Mustafa 'GnoStiC' TUFAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
puae 2.3.0
parent
268a97f6
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
3724 additions
and
1972 deletions
+3724
-1972
disk.c
src/disk.c
+81
-42
drawing.c
src/drawing.c
+1
-1
filesys.c
src/filesys.c
+1
-1
gayle.c
src/gayle.c
+1
-1
ami-win.c
src/gfx-amigaos/ami-win.c
+1
-1
sdlgfx.c
src/gfx-sdl/sdlgfx.c
+44
-17
svga.c
src/gfx-svga/svga.c
+4
-4
xwin.c
src/gfx-x11/xwin.c
+3
-3
gfxutil.c
src/gfxutil.c
+89
-0
disk.h
src/include/disk.h
+1
-1
keyboard.h
src/include/keyboard.h
+6
-3
options.h
src/include/options.h
+1
-1
picasso96.h
src/include/picasso96.h
+398
-235
misc.c
src/misc.c
+110
-0
picasso96.c
src/picasso96.c
+2973
-1653
sysconfig.h
src/sysconfig.h
+1
-0
config.log
src/tools/config.log
+4
-4
uaeresource.c
src/uaeresource.c
+5
-5
No files found.
src/disk.c
View file @
32a6b42d
...
...
@@ -203,12 +203,20 @@ static drive floppy[MAX_FLOPPY_DRIVES];
static
TCHAR
dfxhistory
[
2
][
MAX_PREVIOUS_FLOPPIES
][
MAX_DPATH
];
static
uae_u8
exeheader
[]
=
{
0x00
,
0x00
,
0x03
,
0xf3
,
0x00
,
0x00
,
0x00
,
0x00
};
static
uae_u8
bootblock
[]
=
{
static
uae_u8
bootblock
_ofs
[]
=
{
0x44
,
0x4f
,
0x53
,
0x00
,
0xc0
,
0x20
,
0x0f
,
0x19
,
0x00
,
0x00
,
0x03
,
0x70
,
0x43
,
0xfa
,
0x00
,
0x18
,
0x4e
,
0xae
,
0xff
,
0xa0
,
0x4a
,
0x80
,
0x67
,
0x0a
,
0x20
,
0x40
,
0x20
,
0x68
,
0x00
,
0x16
,
0x70
,
0x00
,
0x4e
,
0x75
,
0x70
,
0xff
,
0x60
,
0xfa
,
0x64
,
0x6f
,
0x73
,
0x2e
,
0x6c
,
0x69
,
0x62
,
0x72
,
0x61
,
0x72
,
0x79
};
static
uae_u8
bootblock_ffs
[]
=
{
0x44
,
0x4F
,
0x53
,
0x01
,
0xE3
,
0x3D
,
0x0E
,
0x72
,
0x00
,
0x00
,
0x03
,
0x70
,
0x43
,
0xFA
,
0x00
,
0x3E
,
0x70
,
0x25
,
0x4E
,
0xAE
,
0xFD
,
0xD8
,
0x4A
,
0x80
,
0x67
,
0x0C
,
0x22
,
0x40
,
0x08
,
0xE9
,
0x00
,
0x06
,
0x00
,
0x22
,
0x4E
,
0xAE
,
0xFE
,
0x62
,
0x43
,
0xFA
,
0x00
,
0x18
,
0x4E
,
0xAE
,
0xFF
,
0xA0
,
0x4A
,
0x80
,
0x67
,
0x0A
,
0x20
,
0x40
,
0x20
,
0x68
,
0x00
,
0x16
,
0x70
,
0x00
,
0x4E
,
0x75
,
0x70
,
0xFF
,
0x4E
,
0x75
,
0x64
,
0x6F
,
0x73
,
0x2E
,
0x6C
,
0x69
,
0x62
,
0x72
,
0x61
,
0x72
,
0x79
,
0x00
,
0x65
,
0x78
,
0x70
,
0x61
,
0x6E
,
0x73
,
0x69
,
0x6F
,
0x6E
,
0x2E
,
0x6C
,
0x69
,
0x62
,
0x72
,
0x61
,
0x72
,
0x79
,
0x00
,
0x00
,
0x00
,
};
#define FS_OFS_DATABLOCKSIZE 488
#define FS_FLOPPY_BLOCKSIZE 512
...
...
@@ -281,7 +289,7 @@ static void createbootblock (uae_u8 *sector, int bootable)
memset
(
sector
,
0
,
FS_FLOPPY_BLOCKSIZE
);
memcpy
(
sector
,
"DOS"
,
3
);
if
(
bootable
)
memcpy
(
sector
,
bootblock
,
sizeof
(
bootblock
));
memcpy
(
sector
,
bootblock
_ofs
,
sizeof
(
bootblock_ofs
));
}
static
void
createrootblock
(
uae_u8
*
sector
,
const
char
*
disk_name
)
...
...
@@ -2054,17 +2062,46 @@ void DISK_ersatz_read (int tr, int sec, uaecptr dest)
zfile_fread
(
dptr
,
1
,
512
,
floppy
[
0
].
diskfile
);
}
static
void
floppy_get_bootblock
(
uae_u8
*
dst
,
bool
ffs
,
bool
bootable
)
{
strcpy
((
char
*
)
dst
,
"DOS"
);
dst
[
3
]
=
ffs
?
1
:
0
;
if
(
bootable
)
memcpy
(
dst
,
ffs
?
bootblock_ffs
:
bootblock_ofs
,
ffs
?
sizeof
bootblock_ffs
:
sizeof
bootblock_ofs
);
}
static
void
floppy_get_rootblock
(
uae_u8
*
dst
,
int
block
,
const
TCHAR
*
disk_name
,
drive_type
adftype
)
{
dst
[
0
+
3
]
=
2
;
dst
[
12
+
3
]
=
0x48
;
dst
[
312
]
=
dst
[
313
]
=
dst
[
314
]
=
dst
[
315
]
=
(
uae_u8
)
0xff
;
dst
[
316
+
2
]
=
(
block
+
1
)
>>
8
;
dst
[
316
+
3
]
=
(
block
+
1
)
&
255
;
char
*
s
=
ua
((
disk_name
&&
_tcslen
(
disk_name
)
>
0
)
?
disk_name
:
"empty"
);
dst
[
432
]
=
strlen
(
s
);
strcpy
((
char
*
)
dst
+
433
,
s
);
xfree
(
s
);
dst
[
508
+
3
]
=
1
;
disk_date
(
dst
+
420
);
memcpy
(
dst
+
472
,
dst
+
420
,
3
*
4
);
memcpy
(
dst
+
484
,
dst
+
420
,
3
*
4
);
disk_checksum
(
dst
,
dst
+
20
);
/* bitmap block */
memset
(
dst
+
512
+
4
,
0xff
,
2
*
block
/
8
);
if
(
adftype
==
0
)
dst
[
512
+
0x72
]
=
0x3f
;
else
dst
[
512
+
0xdc
]
=
0x3f
;
disk_checksum
(
dst
+
512
,
dst
+
512
);
}
/* type: 0=regular, 1=ext2adf */
/* adftype: 0=DD,1=HD,2=DD PC,3=HD PC,4=525SD */
void
disk_creatediskfile
(
TCHAR
*
name
,
int
type
,
drive_type
adftype
,
TCHAR
*
disk_nam
e
)
void
disk_creatediskfile
(
const
TCHAR
*
name
,
int
type
,
drive_type
adftype
,
const
TCHAR
*
disk_name
,
bool
ffs
,
bool
bootabl
e
)
{
int
size
=
32768
;
struct
zfile
*
f
;
int
i
,
l
,
file_size
,
tracks
,
track_len
,
sectors
;
uae_u8
*
chunk
=
NULL
;
uae_u8
tmp
[
3
*
4
];
if
(
disk_name
==
NULL
||
_tcslen
(
disk_name
)
==
0
)
disk_name
=
"empty"
;
int
ddhd
=
1
;
if
(
type
==
1
)
tracks
=
2
*
83
;
...
...
@@ -2080,62 +2117,64 @@ void disk_creatediskfile (TCHAR *name, int type, drive_type adftype, TCHAR *disk
if
(
adftype
==
1
||
adftype
==
3
)
{
file_size
*=
2
;
track_len
*=
2
;
ddhd
=
2
;
}
else
if
(
adftype
==
4
)
{
file_size
/=
2
;
tracks
/=
2
;
}
f
=
zfile_fopen
(
name
,
"wb"
,
0
);
chunk
=
xmalloc
(
uae_u8
,
32768
);
chunk
=
xmalloc
(
uae_u8
,
size
);
if
(
f
&&
chunk
)
{
int
cylsize
=
sectors
*
2
*
512
;
memset
(
chunk
,
0
,
32768
);
memset
(
chunk
,
0
,
size
);
if
(
type
==
0
)
{
for
(
i
=
0
;
i
<
file_size
;
i
+=
cylsize
)
{
memset
(
chunk
,
0
,
cylsize
);
if
(
adftype
<=
1
)
{
if
(
i
==
0
)
{
/* boot block */
strcpy
((
char
*
)
chunk
,
"DOS"
);
floppy_get_bootblock
(
chunk
,
ffs
,
bootable
);
}
else
if
(
i
==
file_size
/
2
)
{
int
block
=
file_size
/
1024
;
/* root block */
chunk
[
0
+
3
]
=
2
;
chunk
[
12
+
3
]
=
0x48
;
chunk
[
312
]
=
chunk
[
313
]
=
chunk
[
314
]
=
chunk
[
315
]
=
(
uae_u8
)
0xff
;
chunk
[
316
+
2
]
=
(
block
+
1
)
>>
8
;
chunk
[
316
+
3
]
=
(
block
+
1
)
&
255
;
chunk
[
432
]
=
strlen
(
disk_name
);
strcpy
((
char
*
)
chunk
+
433
,
disk_name
);
chunk
[
508
+
3
]
=
1
;
disk_date
(
chunk
+
420
);
memcpy
(
chunk
+
472
,
chunk
+
420
,
3
*
4
);
memcpy
(
chunk
+
484
,
chunk
+
420
,
3
*
4
);
disk_checksum
(
chunk
,
chunk
+
20
);
/* bitmap block */
memset
(
chunk
+
512
+
4
,
0xff
,
2
*
file_size
/
(
1024
*
8
));
if
(
adftype
==
0
)
chunk
[
512
+
0x72
]
=
0x3f
;
else
chunk
[
512
+
0xdc
]
=
0x3f
;
disk_checksum
(
chunk
+
512
,
chunk
+
512
);
floppy_get_rootblock
(
chunk
,
file_size
/
1024
,
disk_name
,
adftype
);
}
}
zfile_fwrite
(
chunk
,
cylsize
,
1
,
f
);
}
}
else
{
uae_u8
root
[
4
];
uae_u8
rawtrack
[
3
*
4
],
dostrack
[
3
*
4
];
l
=
track_len
;
zfile_fwrite
(
"UAE-1ADF"
,
8
,
1
,
f
);
tmp
[
0
]
=
0
;
tmp
[
1
]
=
0
;
/* flags (reserved) */
tmp
[
2
]
=
0
;
tmp
[
3
]
=
tracks
;
/* number of tracks */
zfile_fwrite
(
tmp
,
4
,
1
,
f
);
tmp
[
0
]
=
0
;
tmp
[
1
]
=
0
;
/* flags (reserved) */
tmp
[
2
]
=
0
;
tmp
[
3
]
=
1
;
/* track type */
tmp
[
4
]
=
0
;
tmp
[
5
]
=
0
;
tmp
[
6
]
=
(
uae_u8
)(
l
>>
8
);
tmp
[
7
]
=
(
uae_u8
)
l
;
tmp
[
8
]
=
0
;
tmp
[
9
]
=
0
;
tmp
[
10
]
=
0
;
tmp
[
11
]
=
0
;
for
(
i
=
0
;
i
<
tracks
;
i
++
)
zfile_fwrite
(
tmp
,
sizeof
(
tmp
),
1
,
f
);
for
(
i
=
0
;
i
<
tracks
;
i
++
)
root
[
0
]
=
0
;
root
[
1
]
=
0
;
/* flags (reserved) */
root
[
2
]
=
0
;
root
[
3
]
=
tracks
;
/* number of tracks */
zfile_fwrite
(
root
,
4
,
1
,
f
);
rawtrack
[
0
]
=
0
;
rawtrack
[
1
]
=
0
;
/* flags (reserved) */
rawtrack
[
2
]
=
0
;
rawtrack
[
3
]
=
1
;
/* track type */
rawtrack
[
4
]
=
0
;
rawtrack
[
5
]
=
0
;
rawtrack
[
6
]
=
(
uae_u8
)(
l
>>
8
);
rawtrack
[
7
]
=
(
uae_u8
)
l
;
rawtrack
[
8
]
=
0
;
rawtrack
[
9
]
=
0
;
rawtrack
[
10
]
=
0
;
rawtrack
[
11
]
=
0
;
memcpy
(
dostrack
,
rawtrack
,
sizeof
rawtrack
);
dostrack
[
3
]
=
0
;
dostrack
[
9
]
=
(
l
*
8
)
>>
16
;
dostrack
[
10
]
=
(
l
*
8
)
>>
8
;
dostrack
[
11
]
=
(
l
*
8
)
>>
0
;
bool
dodos
=
ffs
||
bootable
||
(
disk_name
&&
_tcslen
(
disk_name
)
>
0
);
for
(
i
=
0
;
i
<
tracks
;
i
++
)
{
uae_u8
tmp
[
3
*
4
];
memcpy
(
tmp
,
rawtrack
,
sizeof
rawtrack
);
if
(
dodos
)
memcpy
(
tmp
,
dostrack
,
sizeof
dostrack
);
zfile_fwrite
(
tmp
,
sizeof
tmp
,
1
,
f
);
}
for
(
i
=
0
;
i
<
tracks
;
i
++
)
{
memset
(
chunk
,
0
,
size
);
if
(
dodos
)
{
if
(
i
==
0
)
floppy_get_bootblock
(
chunk
,
ffs
,
bootable
);
else
if
(
i
==
80
)
floppy_get_rootblock
(
chunk
,
80
*
11
*
ddhd
,
disk_name
,
adftype
);
}
zfile_fwrite
(
chunk
,
l
,
1
,
f
);
}
}
}
xfree
(
chunk
);
...
...
@@ -2208,7 +2247,7 @@ int disk_setwriteprotect (int num, const TCHAR *name, bool writeprotected)
name2
=
DISK_get_saveimagepath
(
name
);
if
(
needwritefile
&&
zf2
==
0
)
disk_creatediskfile
(
name2
,
1
,
drvtype
,
NULL
);
disk_creatediskfile
(
name2
,
1
,
drvtype
,
NULL
,
0
,
0
);
zfile_fclose
(
zf2
);
if
(
writeprotected
&&
iswritefileempty
(
name
))
{
for
(
i
=
0
;
i
<
MAX_FLOPPY_DRIVES
;
i
++
)
{
...
...
@@ -2542,12 +2581,12 @@ uae_u8 DISK_status (void)
return
st
;
}
STATIC_INLINE
int
unformatted
(
const
drive
*
drv
)
static
bool
unformatted
(
const
drive
*
drv
)
{
unsigned
int
tr
=
drv
->
cyl
*
2
+
side
;
if
(
tr
>=
drv
->
num_tracks
)
return
1
;
if
(
drv
->
filetype
==
ADF_EXT2
&&
drv
->
trackdata
[
tr
].
bitlen
==
0
)
if
(
drv
->
filetype
==
ADF_EXT2
&&
drv
->
trackdata
[
tr
].
bitlen
==
0
&&
drv
->
trackdata
[
tr
].
type
!=
TRACK_AMIGADOS
)
return
1
;
if
(
drv
->
trackdata
[
tr
].
type
==
TRACK_NONE
)
return
1
;
...
...
src/drawing.c
View file @
32a6b42d
...
...
@@ -2816,7 +2816,7 @@ STATIC_INLINE void check_picasso (void)
{
#ifdef PICASSO96
if
(
picasso_on
&&
picasso_redraw_necessary
)
picasso_refresh
(
1
);
picasso_refresh
();
picasso_redraw_necessary
=
0
;
if
(
picasso_requested_on
==
picasso_on
)
...
...
src/filesys.c
View file @
32a6b42d
...
...
@@ -5351,7 +5351,7 @@ static uae_u32 REGPARAM2 filesys_init_storeinfo (TrapContext *context)
{
case
1
:
mountertask
=
m68k_areg
(
regs
,
1
);
//
picasso96_alloc (context);
picasso96_alloc
(
context
);
break
;
case
2
:
ret
=
automountunit
;
...
...
src/gayle.c
View file @
32a6b42d
...
...
@@ -195,7 +195,7 @@ STATIC_INLINE void pw (int offset, uae_u16 w)
ide
->
secbuf
[
offset
*
2
+
0
]
=
(
uae_u8
)
w
;
ide
->
secbuf
[
offset
*
2
+
1
]
=
w
>>
8
;
}
static
void
ps
(
int
offset
,
TCHAR
*
src
,
int
max
)
static
void
ps
(
int
offset
,
const
TCHAR
*
src
,
int
max
)
{
int
i
,
len
;
...
...
src/gfx-amigaos/ami-win.c
View file @
32a6b42d
...
...
@@ -1964,7 +1964,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
return
0
;
}
void
gfx_set_picasso_modeinfo
(
int
w
,
int
h
,
int
depth
)
void
gfx_set_picasso_modeinfo
(
uae_u32
w
,
uae_u32
h
,
uae_u32
d
,
int
rgbfmt
)
{
}
...
...
src/gfx-sdl/sdlgfx.c
View file @
32a6b42d
...
...
@@ -1703,20 +1703,28 @@ int DX_Blit (int srcx, int srcy, int dstx, int dsty, int width, int height, BLIT
*/
static
void
add_p96_mode
(
int
width
,
int
height
,
int
emulate_chunky
,
int
*
count
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<=
(
emulate_chunky
?
1
:
0
);
i
++
)
{
if
(
*
count
<
MAX_PICASSO_MODES
)
{
DisplayModes
[
*
count
].
res
.
width
=
width
;
DisplayModes
[
*
count
].
res
.
height
=
height
;
DisplayModes
[
*
count
].
depth
=
(
i
==
1
)
?
1
:
bit_unit
>>
3
;
DisplayModes
[
*
count
].
refresh
=
75
;
(
*
count
)
++
;
write_log
(
"SDLGFX: Added P96 mode: %dx%dx%d
\n
"
,
width
,
height
,
(
i
==
1
)
?
8
:
bitdepth
);
unsigned
int
i
;
struct
MultiDisplay
*
md1
;
md1
=
Displays
;
struct
MultiDisplay
*
md
=
(
struct
MultiDisplay
*
)
md1
;
md1
->
DisplayModes
=
xmalloc
(
struct
PicassoResolution
,
MAX_PICASSO_MODES
);
md1
->
DisplayModes
[
0
].
depth
=
-
1
;
md1
->
disabled
=
1
;
for
(
i
=
0
;
i
<=
(
emulate_chunky
?
1
:
0
);
i
++
)
{
if
(
*
count
<
MAX_PICASSO_MODES
)
{
DisplayModes
[
*
count
].
res
.
width
=
width
;
DisplayModes
[
*
count
].
res
.
height
=
height
;
DisplayModes
[
*
count
].
depth
=
(
i
==
1
)
?
1
:
bit_unit
>>
3
;
DisplayModes
[
*
count
].
refresh
[
0
]
=
75
;
(
*
count
)
++
;
write_log
(
"SDLGFX: Added P96 mode: %dx%dx%d
\n
"
,
width
,
height
,
(
i
==
1
)
?
8
:
bitdepth
);
addmode
(
md
,
width
,
height
,
bitdepth
,
75
,
0
);
}
}
}
return
;
return
;
}
int
DX_FillResolutions
(
uae_u16
*
ppixel_format
)
...
...
@@ -1806,7 +1814,7 @@ static void set_window_for_picasso (void)
graphics_subinit
();
}
void
gfx_set_picasso_modeinfo
(
int
w
,
int
h
,
int
depth
,
int
rgbfmt
)
void
gfx_set_picasso_modeinfo
(
uae_u32
w
,
uae_u32
h
,
uae_u32
depth
,
RGBFTYPE
rgbfmt
)
{
DEBUG_LOG
(
"Function: gfx_set_picasso_modeinfo w: %i h: %i depth: %i rgbfmt: %i
\n
"
,
w
,
h
,
depth
,
rgbfmt
);
...
...
@@ -1815,7 +1823,20 @@ void gfx_set_picasso_modeinfo (int w, int h, int depth, int rgbfmt)
picasso_vidinfo
.
depth
=
depth
;
picasso_vidinfo
.
pixbytes
=
bit_unit
>>
3
;
if
(
screen_is_picasso
)
set_window_for_picasso
();
set_window_for_picasso
();
}
/* Color management */
//static xcolnr xcol8[4096];
static
int
red_bits
,
green_bits
,
blue_bits
,
alpha_bits
;
static
int
red_shift
,
green_shift
,
blue_shift
,
alpha_shift
;
static
int
alpha
;
void
gfx_set_picasso_colors
(
RGBFTYPE
rgbfmt
)
{
alloc_colors_picasso
(
red_bits
,
green_bits
,
blue_bits
,
red_shift
,
green_shift
,
blue_shift
,
rgbfmt
);
}
void
gfx_set_picasso_state
(
int
on
)
...
...
@@ -1823,12 +1844,12 @@ void gfx_set_picasso_state (int on)
DEBUG_LOG
(
"Function: gfx_set_picasso_state: %d
\n
"
,
on
);
if
(
on
==
screen_is_picasso
)
return
;
return
;
/* We can get called by drawing_init() when there's
* no window opened yet... */
if
(
display
==
0
)
return
return
graphics_subshutdown
();
screen_was_picasso
=
screen_is_picasso
;
...
...
@@ -2217,3 +2238,9 @@ int gfx_parse_option (struct uae_prefs *p, const char *option, const char *value
#endif
/* USE_GL */
return
result
;
}
int
WIN32GFX_IsPicassoScreen
(
void
)
{
return
screen_is_picasso
;
}
src/gfx-svga/svga.c
View file @
32a6b42d
...
...
@@ -797,7 +797,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
DisplayModes
[
count
].
res
.
width
=
x_size_table
[
i
];
DisplayModes
[
count
].
res
.
height
=
y_size_table
[
i
];
DisplayModes
[
count
].
depth
=
1
;
DisplayModes
[
count
].
refresh
=
75
;
DisplayModes
[
count
].
refresh
[
0
]
=
75
;
count
++
;
format
|=
RGBFF_CHUNKY
;
}
...
...
@@ -806,7 +806,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
DisplayModes
[
count
].
res
.
width
=
x_size_table
[
i
];
DisplayModes
[
count
].
res
.
height
=
y_size_table
[
i
];
DisplayModes
[
count
].
depth
=
2
;
DisplayModes
[
count
].
refresh
=
75
;
DisplayModes
[
count
].
refresh
[
0
]
=
75
;
count
++
;
format
|=
RGBFF_R5G6B5PC
;
}
...
...
@@ -815,7 +815,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
DisplayModes
[
count
].
res
.
width
=
x_size_table
[
i
];
DisplayModes
[
count
].
res
.
height
=
y_size_table
[
i
];
DisplayModes
[
count
].
depth
=
4
;
DisplayModes
[
count
].
refresh
=
75
;
DisplayModes
[
count
].
refresh
[
0
]
=
75
;
count
++
;
format
|=
RGBFF_B8G8R8A8
;
}
...
...
@@ -846,7 +846,7 @@ static void set_window_for_amiga (void)
restore_vga_colors
();
}
void
gfx_set_picasso_modeinfo
(
int
w
,
int
h
,
int
depth
,
int
rgbfmt
)
void
gfx_set_picasso_modeinfo
(
uae_u32
w
,
uae_u32
h
,
uae_u32
depth
,
int
rgbfmt
)
{
vga_modeinfo
*
info
;
int
i
,
mode
;
...
...
src/gfx-x11/xwin.c
View file @
32a6b42d
...
...
@@ -1405,7 +1405,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
DisplayModes
[
count
].
res
.
width
=
allmodes
[
i
]
->
hdisplay
;
DisplayModes
[
count
].
res
.
height
=
allmodes
[
i
]
->
vdisplay
;
DisplayModes
[
count
].
depth
=
j
==
1
?
1
:
bit_unit
>>
3
;
DisplayModes
[
count
].
refresh
=
75
;
DisplayModes
[
count
].
refresh
[
0
]
=
75
;
count
++
;
}
}
...
...
@@ -1423,7 +1423,7 @@ int DX_FillResolutions (uae_u16 *ppixel_format)
DisplayModes
[
count
].
res
.
width
=
x_size_table
[
i
];
DisplayModes
[
count
].
res
.
height
=
y_size_table
[
i
];
DisplayModes
[
count
].
depth
=
j
==
1
?
1
:
bit_unit
>>
3
;
DisplayModes
[
count
].
refresh
=
75
;
DisplayModes
[
count
].
refresh
[
0
]
=
75
;
count
++
;
}
}
...
...
@@ -1447,7 +1447,7 @@ static void set_window_for_picasso (void)
#endif
}
void
gfx_set_picasso_modeinfo
(
int
w
,
int
h
,
int
depth
,
int
rgbfmt
)
void
gfx_set_picasso_modeinfo
(
uae_u32
w
,
uae_u32
h
,
uae_u32
depth
,
int
rgbfmt
)
{
picasso_vidinfo
.
width
=
w
;
picasso_vidinfo
.
height
=
h
;
...
...
src/gfxutil.c
View file @
32a6b42d
...
...
@@ -209,6 +209,95 @@ static uae_u32 lowbits (int v, int shift, int lsize)
return
v
;
}
void
alloc_colors_picasso
(
int
rw
,
int
gw
,
int
bw
,
int
rs
,
int
gs
,
int
bs
,
int
rgbfmt
)
{
int
byte_swap
=
0
;
int
i
;
int
red_bits
=
0
,
green_bits
,
blue_bits
;
int
red_shift
,
green_shift
,
blue_shift
;
int
bpp
=
rw
+
gw
+
bw
;
switch
(
rgbfmt
)
{
case
RGBFB_R5G6B5PC
:
red_bits
=
5
;
green_bits
=
6
;
blue_bits
=
5
;
red_shift
=
11
;
green_shift
=
5
;
blue_shift
=
0
;
break
;
case
RGBFB_R5G5B5PC
:
red_bits
=
green_bits
=
blue_bits
=
5
;
red_shift
=
10
;
green_shift
=
5
;
blue_shift
=
0
;
break
;
case
RGBFB_R5G6B5
:
red_bits
=
5
;
green_bits
=
6
;
blue_bits
=
5
;
red_shift
=
11
;
green_shift
=
5
;
blue_shift
=
0
;
byte_swap
=
1
;
break
;
case
RGBFB_R5G5B5
:
red_bits
=
green_bits
=
blue_bits
=
5
;
red_shift
=
10
;
green_shift
=
5
;
blue_shift
=
0
;
byte_swap
=
1
;
break
;
case
RGBFB_B5G6R5PC
:
red_bits
=
5
;
green_bits
=
6
;
blue_bits
=
5
;
red_shift
=
0
;
green_shift
=
5
;
blue_shift
=
11
;
break
;
case
RGBFB_B5G5R5PC
:
red_bits
=
5
;
green_bits
=
5
;
blue_bits
=
5
;
red_shift
=
0
;
green_shift
=
5
;
blue_shift
=
10
;
break
;
default:
red_bits
=
rw
;
green_bits
=
gw
;
blue_bits
=
bw
;
red_shift
=
rs
;
green_shift
=
gs
;
blue_shift
=
bs
;
break
;
}
memset
(
p96_rgbx16
,
0
,
sizeof
p96_rgbx16
);
if
(
red_bits
)
{
int
lrbits
=
8
-
red_bits
;
int
lgbits
=
8
-
green_bits
;
int
lbbits
=
8
-
blue_bits
;
int
lrmask
=
(
1
<<
red_bits
)
-
1
;
int
lgmask
=
(
1
<<
green_bits
)
-
1
;
int
lbmask
=
(
1
<<
blue_bits
)
-
1
;
for
(
i
=
65535
;
i
>=
0
;
i
--
)
{
uae_u32
r
,
g
,
b
,
c
;
uae_u32
j
=
byte_swap
?
bswap_16
(
i
)
:
i
;
r
=
(((
j
>>
red_shift
)
&
lrmask
)
<<
lrbits
)
|
lowbits
(
j
,
red_shift
,
lrbits
);
g
=
(((
j
>>
green_shift
)
&
lgmask
)
<<
lgbits
)
|
lowbits
(
j
,
green_shift
,
lgbits
);
b
=
(((
j
>>
blue_shift
)
&
lbmask
)
<<
lbbits
)
|
lowbits
(
j
,
blue_shift
,
lbbits
);
c
=
doMask
(
r
,
rw
,
rs
)
|
doMask
(
g
,
gw
,
gs
)
|
doMask
(
b
,
bw
,
bs
);
if
(
bpp
<=
16
)
c
*=
0x00010001
;
p96_rgbx16
[
i
]
=
c
;
}
}
}
void
alloc_colors_rgb
(
int
rw
,
int
gw
,
int
bw
,
int
rs
,
int
gs
,
int
bs
,
int
aw
,
int
as
,
int
alpha
,
int
byte_swap
,
uae_u32
*
rc
,
uae_u32
*
gc
,
uae_u32
*
bc
)
{
...
...
src/include/disk.h
View file @
32a6b42d
...
...
@@ -28,7 +28,7 @@ extern void DISK_hsync (void);
extern
void
DISK_reset
(
void
);
extern
int
disk_getwriteprotect
(
const
TCHAR
*
name
);
extern
int
disk_setwriteprotect
(
int
num
,
const
TCHAR
*
name
,
bool
writeprotected
);
extern
void
disk_creatediskfile
(
TCHAR
*
name
,
int
type
,
drive_type
adftype
,
TCHAR
*
disk_nam
e
);
extern
void
disk_creatediskfile
(
const
TCHAR
*
name
,
int
type
,
drive_type
adftype
,
const
TCHAR
*
disk_name
,
bool
ffs
,
bool
bootabl
e
);
extern
void
dumpdisk
(
void
);
extern
int
DISK_history_add
(
const
TCHAR
*
name
,
int
idx
,
int
type
,
int
donotcheck
);
extern
TCHAR
*
DISK_history_get
(
int
idx
,
int
type
);
...
...
src/include/keyboard.h
View file @
32a6b42d
...
...
@@ -124,10 +124,13 @@
#define AK_TERM_POWERUP 0xfe
// KB LED stuff
#define KBLED_NUMLOCKB 0
#define KBLED_CAPSLOCKB 1
#define KBLED_SCROLLLOCKB 2
#define KBLED_NUMLOCK
1
#define KBLED_CAPSLOCK
2
#define KBLED_SCROLLLOCK
4
#define KBLED_NUMLOCK
M (1 << KBLED_NUMLOCKB)
#define KBLED_CAPSLOCK
M (1 << KBLED_CAPSLOCKB)
#define KBLED_SCROLLLOCK
M (1 << KBLED_SCROLLLOCKB)
enum
aks
{
AKS_ENTERGUI
=
0x200
,
AKS_SCREENSHOT_FILE
,
AKS_SCREENSHOT_CLIPBOARD
,
AKS_FREEZEBUTTON
,
AKS_FLOPPY0
,
AKS_FLOPPY1
,
AKS_FLOPPY2
,
AKS_FLOPPY3
,
...
...
src/include/options.h
View file @
32a6b42d
...
...
@@ -412,7 +412,6 @@ struct uae_prefs {
bool
win32_rtgscaleifsmall
;
bool
win32_rtgallowscaling
;
int
win32_rtgscaleaspectratio
;
int
win32_rtgvblankrate
;
bool
win32_borderless
;
bool
win32_ctrl_F11_is_quit
;
bool
win32_automount_removable
;
...
...
@@ -435,6 +434,7 @@ struct uae_prefs {
TCHAR
win32_parjoyport0
[
MAX_DPATH
];
TCHAR
win32_parjoyport1
[
MAX_DPATH
];
#endif
int
win32_rtgvblankrate
;
#ifdef USE_CURSES_GFX
int
curses_reverse_video
;
...
...
src/include/picasso96.h
View file @
32a6b42d
This diff is collapsed.
Click to expand it.
src/misc.c
View file @
32a6b42d
...
...
@@ -1149,3 +1149,113 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
write_log
(
"kbd = %d, scancode = %d, state = %d
\n
"
,
keyboard
,
scancode
,
newstate
);
inputdevice_translatekeycode
(
keyboard
,
scancode
,
newstate
);
}
//win32gfx
#define MAX_DISPLAYS 10
struct
MultiDisplay
Displays
[
MAX_DISPLAYS
];
struct
MultiDisplay
*
getdisplay
(
struct
uae_prefs
*
p
)
{
int
i
;
int
display
=
p
->
gfx_display
;
write_log
(
"Multimonitor detection disabled
\n
"
);
Displays
[
0
].
primary
=
1
;
Displays
[
0
].
name
=
"Display"
;
Displays
[
0
].
disabled
=
0
;
i
=
0
;
while
(
Displays
[
i
].
name
)
{
struct
MultiDisplay
*
md
=
&
Displays
[
i
];
if
(
p
->
gfx_display_name
[
0
]
&&
!
_tcscmp
(
md
->
name
,
p
->
gfx_display_name
))
return
md
;
if
(
p
->
gfx_display_name
[
0
]
&&
!
_tcscmp
(
md
->
name2
,
p
->
gfx_display_name
))
return
md
;
i
++
;
}
if
(
i
==
0
)
{
write_log
(
"no display adapters! Exiting"
);
exit
(
0
);
}
if
(
display
>=
i
)
display
=
0
;
return
&
Displays
[
display
];
}
void
addmode
(
struct
MultiDisplay
*
md
,
int
w
,
int
h
,
int
d
,
int
rate
,
int
nondx
)
{
int
ct
;
int
i
,
j
;
ct
=
0
;
if
(
d
==
8
)
ct
=
RGBMASK_8BIT
;
if
(
d
==
15
)
ct
=
RGBMASK_15BIT
;
if
(
d
==
16
)
ct
=
RGBMASK_16BIT
;
if
(
d
==
24
)
ct
=
RGBMASK_24BIT
;
if
(
d
==
32
)
ct
=
RGBMASK_32BIT
;
if
(
ct
==
0
)
return
;
d
/=
8
;
i
=
0
;
while
(
md
->
DisplayModes
[
i
].
depth
>=
0
)
{
if
(
md
->
DisplayModes
[
i
].
depth
==
d
&&
md
->
DisplayModes
[
i
].
res
.
width
==
w
&&
md
->
DisplayModes
[
i
].
res
.
height
==
h
)
{
for
(
j
=
0
;
j
<
MAX_REFRESH_RATES
;
j
++
)
{
if
(
md
->
DisplayModes
[
i
].
refresh
[
j
]
==
0
||
md
->
DisplayModes
[
i
].
refresh
[
j
]
==
rate
)
break
;
}
if
(
j
<
MAX_REFRESH_RATES
)
{
md
->
DisplayModes
[
i
].
refresh
[
j
]
=
rate
;
md
->
DisplayModes
[
i
].
refreshtype
[
j
]
=
nondx
;
md
->
DisplayModes
[
i
].
refresh
[
j
+
1
]
=
0
;
return
;
}
}
i
++
;
}
i
=
0
;
while
(
md
->
DisplayModes
[
i
].
depth
>=
0
)
i
++
;
if
(
i
>=
MAX_PICASSO_MODES
-
1
)
return
;
md
->
DisplayModes
[
i
].
nondx
=
nondx
;
md
->
DisplayModes
[
i
].
res
.
width
=
w
;
md
->
DisplayModes
[
i
].
res
.
height
=
h
;
md
->
DisplayModes
[
i
].
depth
=
d
;
md
->
DisplayModes
[
i
].
refresh
[
0
]
=
rate
;
md
->
DisplayModes
[
i
].
refreshtype
[
0
]
=
nondx
;
md
->
DisplayModes
[
i
].
refresh
[
1
]
=
0
;
md
->
DisplayModes
[
i
].
colormodes
=
ct
;
md
->
DisplayModes
[
i
+
1
].
depth
=
-
1
;
_stprintf
(
md
->
DisplayModes
[
i
].
name
,
"%dx%d, %d-bit"
,
md
->
DisplayModes
[
i
].
res
.
width
,
md
->
DisplayModes
[
i
].
res
.
height
,
md
->
DisplayModes
[
i
].
depth
*
8
);
}
//dxwrap
int
DirectDraw_CurrentRefreshRate
(
void
)
{
//DirectDraw_GetDisplayMode ();
//return dxdata.native.dwRefreshRate;
return
50
;
}
int
DirectDraw_GetVerticalBlankStatus
(
void
)
{
// BOOL status;
// if (FAILED (IDirectDraw7_GetVerticalBlankStatus (dxdata.maindd, &status)))
return
-
1
;
// return status;
}
// direct3d
int
D3D_goodenough
(
void
)
{
return
0
;
}
src/picasso96.c
View file @
32a6b42d
This diff is collapsed.
Click to expand it.
src/sysconfig.h
View file @
32a6b42d
...
...
@@ -456,3 +456,4 @@
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */
#define PICASSO96
src/tools/config.log
View file @
32a6b42d
...
...
@@ -14,7 +14,7 @@ hostname = GnoStiC-dv7
uname -m = i686
uname -r = 2.6.32-24-generic
uname -s = Linux
uname -v = #4
1-Ubuntu SMP Thu Aug 19 01:12:52
UTC 2010
uname -v = #4
2-Ubuntu SMP Fri Aug 20 14:24:04
UTC 2010
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
...
...
@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes
configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
AAwvoL
.o: In function `main':
/tmp/cc
3ddsdl
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status
configure:4350: $? = 1
...
...
@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes
configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
IwYmH0
.o: In function `main':
/tmp/cc
yjfxIA
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status
configure:4364: $? = 1
...
...
@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no
configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
XSlxnT
.o: In function `main':
/tmp/cc
s8WUKF
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status
configure:4364: $? = 1
...
...
src/uaeresource.c
View file @
32a6b42d
/*
* UAE - The Un*x Amiga Emulator
*
* uae.resource
*
*/
* UAE - The Un*x Amiga Emulator
*
* uae.resource
*
*/
#include "sysconfig.h"
#include "sysdeps.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment