Skip to content

Commit

Permalink
Merge branch 'audetto'
Browse files Browse the repository at this point in the history
  • Loading branch information
sh95014 committed Dec 28, 2024
2 parents 484197e + e0bb9f1 commit f70283f
Show file tree
Hide file tree
Showing 153 changed files with 963 additions and 749 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@ jobs:
- name: Build
run: |
cmake --version
cmake -S . -B build
cmake --build build
cmake -S . -DQAPPLE_USE_QT5=ON -DBUILD_QAPPLE=ON -B build-qt5
cmake --build build-qt5
2 changes: 1 addition & 1 deletion AppleWin-VS2022.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWin-VS2022
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E} = {9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zip_lib", "zip_lib\zip_VS2022.vcxproj", "{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip\zip_VS2022.vcxproj", "{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib-VS2022.vcxproj", "{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}"
EndProject
Expand Down
14 changes: 7 additions & 7 deletions AppleWin-VS2022.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
<None Include="source\CPU\cpu_instructions.inl" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="zip_lib\zip_VS2022.vcxproj">
<ProjectReference Include="minizip\zip_VS2022.vcxproj">
<Project>{509739e7-0af3-4c09-a1a9-f0b1bc31b39d}</Project>
</ProjectReference>
<ProjectReference Include="zlib\zlib-VS2022.vcxproj">
Expand Down Expand Up @@ -467,7 +467,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
Expand All @@ -494,7 +494,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
Expand Down Expand Up @@ -523,7 +523,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;NO_DIRECT_X;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
Expand Down Expand Up @@ -551,7 +551,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -583,7 +583,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -617,7 +617,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;NO_DIRECT_X;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
Expand Down
2 changes: 1 addition & 1 deletion AppleWinExpress2019.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppleWin", "AppleWinExpress
{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E} = {9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zip_lib", "zip_lib\zip_lib2019.vcxproj", "{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip\zip_lib2019.vcxproj", "{509739E7-0AF3-4C09-A1A9-F0B1BC31B39D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib-Express2019.vcxproj", "{9B32A6E7-1237-4F36-8903-A3FD51DF9C4E}"
EndProject
Expand Down
19 changes: 10 additions & 9 deletions AppleWinExpress2019.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<ClInclude Include="source\LanguageCard.h" />
<ClInclude Include="source\Log.h" />
<ClInclude Include="source\Memory.h" />
<ClInclude Include="source\MemoryDefs.h" />
<ClInclude Include="source\Mockingboard.h" />
<ClInclude Include="source\MockingboardCardManager.h" />
<ClInclude Include="source\MockingboardDefs.h" />
Expand Down Expand Up @@ -320,7 +321,7 @@
<None Include="source\CPU\cpu_instructions.inl" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="zip_lib\zip_lib2019.vcxproj">
<ProjectReference Include="minizip\zip_lib2019.vcxproj">
<Project>{509739e7-0af3-4c09-a1a9-f0b1bc31b39d}</Project>
</ProjectReference>
<ProjectReference Include="zlib\zlib-Express2019.vcxproj">
Expand Down Expand Up @@ -466,7 +467,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
Expand All @@ -493,7 +494,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
Expand All @@ -509,7 +510,7 @@
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
.\Debug\TestCPU6502.exe</Command>
".\Debug v141_xp\TestCPU6502.exe"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Performing unit-test: TestCPU6502</Message>
Expand All @@ -522,7 +523,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;NO_DIRECT_X;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<ConformanceMode>true</ConformanceMode>
Expand Down Expand Up @@ -550,7 +551,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -582,7 +583,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
Expand All @@ -601,7 +602,7 @@
</Link>
<PreBuildEvent>
<Command>echo Performing unit-test: TestCPU6502
.\Release\TestCPU6502.exe</Command>
".\Release v141_xp\TestCPU6502.exe"</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Performing unit-test: TestCPU6502</Message>
Expand All @@ -616,7 +617,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;NO_DSHOW_STRSAFE;NO_DIRECT_X;YAML_DECLARE_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;zip_lib;libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>source;source\cpu;source\debugger;zlib;$(SolutionDir);libyaml\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
Expand Down
3 changes: 3 additions & 0 deletions AppleWinExpress2019.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@
<ClInclude Include="source\MockingboardDefs.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
<ClInclude Include="source\MemoryDefs.h">
<Filter>Source Files\Emulator</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="resource\Applewin.bmp">
Expand Down
14 changes: 4 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,9 @@ execute_process(COMMAND uname -m
OUTPUT_VARIABLE UNAME
OUTPUT_STRIP_TRAILING_WHITESPACE)

if((${UNAME} STREQUAL armv7l) OR (${UNAME} STREQUAL aarch64))
# it is too slow and might cause out of memory issues
# more forensic is required
MESSAGE(NOTICE "Raspberry Pi detected: IPO disabled")
else()
include(CheckIPOSupported)
check_ipo_supported()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/compile_commands.json ${CMAKE_SOURCE_DIR}/compile_commands.json
)

include_directories(source)

Expand Down Expand Up @@ -86,7 +80,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apple ][ emulator for Linux")
set(CPACK_PACKAGE_CONTACT "audetto <[email protected]>")

set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libyaml-0-2,libminizip1,libqt5gui5,libqt5widgets5,libqt5multimedia5,libqt5gamepad5,libncursesw6,libevdev2,libsdl2-image-2.0-0,libsdl2-2.0-0,libgles2,libpcap0.8,libslirp0,libboost-program-options1.74.0")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libyaml-0-2,libminizip1,libqt5gui5,libqt5widgets5,libqt5multimedia5,libqt5gamepad5,libncursesw6,libevdev2,libsdl2-image-2.0-0,libsdl2-2.0-0,libgles2,libpcap0.8,libslirp0,libboost-program-options1.74.0|libboost-program-options1.81.0|libboost-program-options1.83.0")

set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set(CPACK_RPM_PACKAGE_GROUP "Applications/Emulators")
Expand Down
19 changes: 18 additions & 1 deletion bin/History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@ https://github.com/AppleWin/AppleWin/issues/new
Tom Charlesworth


1.30.20.0 - 16 Nov 2024
-----------------------
- [Change #1312] Support Hayden's Applesoft compiler protection key.
- For use with Hayden's 1981 AppleSoft compiler (DOS 3.2 and DOS 3.3 pre-release versions).
- [Change #1337] HDC controller: support Format command (both SmartPort and ProDOS block device):
- [Bug #88] Fix for Oz-DOS (uses ProDOS block device command).
- SP Status command: 'General Status': set format-allowed & write-protected flags
- For read-only HDD images: support them as write-protected.
- [Change #1319] For II/II+/Unenhanced //e use the new SmartPort firmware, but with $Cs07 = 0x3C:
- This now defaults to supporting 4 block mode devices (instead of the previous 2).
- [Change #1295] Help doc: add troubleshooting note about "High DPI scaling override", eg. for 2K or 4K monitors.
- [Change #1290] Save-state: add absolute path to disk & hard disk image. [@audetto]
- [Bug #1333] Mockingboard: fix edge-case for 6522 Timer1/2 read/write (cycle accuracy). Test added to (future) mb-audit v1.56.
- [Bug #1321] Uthernet/Uthernet II cards: fix $Csxx space not reading as floating-bus.
- [Bug #1227] Fix issue with not being able to insert a 3.5" 800K image (after failing to insert it into a 5.25" drive).
- [PR #1335] Help doc: add some 'quick-start' info to the Keyboard page.


1.30.19.0 - 28 Jul 2024
-----------------------
- [Change #1207] Support for SmartPort hard disk controller for Enhanced //e. [Thanks to @burniouf, with additional testing and input from: @alupin65, @inexorabletash, @univta0001]
Expand All @@ -28,7 +46,6 @@ Tom Charlesworth
-----------------------
- [Change #1272] New HDC firmware v2 to support returning HDD size in Y:X for status call. [@peteri]
- [Change #1277] Add (debug) cmd line switch to revert to HDC firmware v1: -hdc-firmware-v1.
- [Bug #88] Fixes "Oz DOS 1.0" crashing or returning "This device is too small for Oz-DOS...".
- [Change #1279] Support Saturn RAM card in slot 3 for any Apple II model (for Robo Systems' RoboCAD 2).
- [Change #1159] Speaker: change from mono to stereo sound buffer.
- [Change #1247] Robocom's Interface Module dongle: use actual values for 1000 & 1500 series dongles.
Expand Down
37 changes: 25 additions & 12 deletions firmware/HDD-SmartPort/HDC-SmartPort.a65
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Cn_BLK php
ldy #0

- lda BLK_Cmd,y
sta IO_BlkCmdFifo,x ; BLK_Cmd's are $0x
sta IO_BlkCmdFifo,x ; BLK_Cmd's are $0x (NB. not range-checked unlike SP cmds)
iny ; BLK_UnitNum's are DSSS0000 : if SSS does NOT match physical slot...
; ...hardware should handle the remap by adding +2 to the REAL dev_ID
cpy #6 ; that way, a BLK controller can support 4 devices (see $CnFE byte below)
Expand Down Expand Up @@ -276,7 +276,9 @@ Cn_BLK_Done lsr ; Post: C=0 or 1
Cn_SP lda (Ptr1),y ; CMD byte

cmp #SP_Cmd_format
bcs Cn_SP_E_BADCALL ; only STATUS, READBLOCK & WRITEBLOCK supported
beq +
bcs Cn_SP_E_BADCALL ; only STATUS, READBLOCK, WRITEBLOCK & FORMAT supported
+ ; C=1 if FORMAT cmd [*1]

ldx Slot_n0

Expand All @@ -290,18 +292,28 @@ Cn_SP lda (Ptr1),y ; CMD byte
lda (Ptr1),y

sta Ptr1+1
pla
pla
sta Ptr1 ; Now Ptr1 = Param list

ldy #0 ; Param Cnt
ldy #0 ; Param Idx (in bytes)

lda (Ptr1),y
cmp #3 ; STATUS, READBLOCK & WRITEBLOCK = all 3 parameters
sec
!if 1 { ; (This parameter-checking code could be removed to free up some space)
bcs @format ; NB. C-flag untouched from above [*1]
cmp #3 ; STATUS, READBLOCK & WRITEBLOCK: all have 3 parameters
beq +
bne Cn_SP_E_BADCNT

- iny ; UnitNum (B), MemPtr (L/H), DiskBlock (L/M/H) -> IO (R,W)
lda (Ptr1),y ; UnitNum (B), MemPtr (L/H), StatusCode (B) -> IO (S)
@format cmp #1 ; FORMAT: has 1 parameter
bne Cn_SP_E_BADCNT
+
}

; Parameter-1: Parameter-2: Parameter-3:
; UnitNum (B), MemPtr (L/H), StatusCode (B) -> IO (STATUS)
; UnitNum (B), MemPtr (L/H), DiskBlock (L/M/H) -> IO (READ,WRITE)
; UnitNum (B) -> IO (FORMAT)
- iny ; Always copy 6 more bytes to the FIFO regardless of the command
lda (Ptr1),y
sta IO_SPCmdFifo,x ; UnitNum Range is 0 (smartport controller itself), 1,2,3.....
cpy #6 ; blockNums are 24-bit for SP calls
bcc -
Expand Down Expand Up @@ -364,16 +376,17 @@ Cn_SP_E_BADCNT ldx #E_BADCNT
; $C7 = Removable, Interruptable, #Volumes=1, Supports write/read/status
; $D7 = Removable, Interruptable, #Volumes=2, Supports write/read/status
; $F7 = Removable, Interruptable, #Volumes=4, Supports write/read/status
; $BF = Removable, Interruptable, #Volumes=4, Supports format/write/read/status (KEGS / IIGS)
; $FF = Removable, Interruptable, #Volumes=4, Supports format/write/read/status
; $BF = Removable, , #Volumes=4, Supports format/write/read/status (KEGS / IIGS)
;
; $CnFF = offset to BLK entry point
;--------------------------------------
@checkCsFB
*= $00FB ; org $00FB
!warn "CsFB padding = ", * - @checkCsFB
;--------------------------------------
!byte $00 ; Smart port ID Type byte
!byte $00 ; SmartPort ID Type byte
!word $0000 ; how many blocks are on the device. Zero means use status call
!byte $F7 ; specifics about the device (number of drives, read/write/format capability, etc)
!byte $FF ; specifics about the device (number of drives, read/write/format capability, etc)
!byte <Cn_Entry_BLK ; entry point offset for ProDOS (must be $0a)
;--------------------------------------
Binary file modified firmware/HDD-SmartPort/HDC-SmartPort.bin
Binary file not shown.
Loading

0 comments on commit f70283f

Please sign in to comment.