15 August 2017, 17:37 | #181 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
i made some checks of data read in from within the source:
Code:
char Disk2_rom[] = "\xA2\x20\xA0\x00\xA2\x03\x86\x3C\x8A\x0A\x24\x3C\xF0\x10\x05\x3C" .... ; void DiskLoadRom(LPBYTE pCxRomPeripheral, UINT uSlot) { const UINT DISK2_FW_SIZE = 256; BYTE* pData = (BYTE*) Disk2_rom; // NB. Don't need to unlock resource memcpy(pCxRomPeripheral + uSlot*256, pData, DISK2_FW_SIZE); int i; printf ("Disk2_rom: pdata\n"); for( i = 0; i < DISK2_FW_SIZE; i++ ){ printf (" %02x", pData[i]); } printf ("\n\nDisk2_rom: pCxRomPeripheral\n"); for( i = 0; i < DISK2_FW_SIZE; i++ ){ printf (" %02x", (pCxRomPeripheral + uSlot*256)[i]); } printf ("\n\n"); // RegisterIoHandler(uSlot, Disk_IORead, Disk_IOWrite, NULL, NULL, NULL, NULL); } Code:
Disk2_rom: pdata a2 20 a0 00 a2 03 86 3c 8a 0a 24 3c f0 10 05 ... ... Disk2_rom: pCxRomPeripheral a2 20 a0 00 a2 03 86 3c 8a 0a 24 3c f0 10 05 ... #1) i did add SDL_BIG_ENDIAN to the preprocessor, it's a condition in soundcore.cpp and stretch.cpp Intel vs PPC, but it does not have an impact as of yet. thats the only occurance of "endian" thing in the whole source. ^^ removed since it was already set in sdl include files. zoned: updated AmiApple-WIP.lha Last edited by emufan; 15 August 2017 at 19:28. |
15 August 2017, 18:01 | #182 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
|
doesn't prove anything, you just copied an array of bytes and print them. maybe endianness isn't used at all: you can code everything endian agnostic in an emulator.
|
15 August 2017, 18:09 | #183 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
still no proof? Code:
Memory.cpp: DiskLoadRom(pCxRomPeripheral, 6); // $C600 : Disk][ f/w maybe someone can check what is wrong? maybe it is related to the SDLError: passed a NULL mutex. noixemul_off.dev is recent project file alkis, Nova? Last edited by emufan; 15 August 2017 at 19:24. |
|
15 August 2017, 19:32 | #184 |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Your test shows that the Disk2_rom array endianess did not change by the memcpy(). It is possible for static data to be stored in little endian order but this is unlikely for the ROM of an 8 bit CPU which is likely to be accessed a byte at a time anyway (big and little endian order is the same for byte address accesses). Data read from Disk2_rom pCxRomPeripheral could be endian swapped somewhere in other code but it looks like the pointers are byte pointers which should be ok as long as there are no casts. Any endian swapping of this data should probably be removed. Look for __builtin_bswapxx() or SDL_SWAPxx() but many older programs roll their own. The main reason for accessing data in larger widths than a byte is to improve performance so it may be more likely to occur around display code for an 8 bit emulator.
|
15 August 2017, 19:44 | #185 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
thanks for explaining. there are no such swap functions or calls.
maybe we are digging in the wrong pit, could be something endian unrelated after all. |
16 August 2017, 01:42 | #186 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
|
If I get time I'll check the source code archive you uploaded and see if I can help...
|
16 August 2017, 01:49 | #187 |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
One could easily say we are reaching the end for a successful port The apple is right there at visual sight distance, we just need to be able to figure out how to stretch our arm and grab it.
|
16 August 2017, 02:35 | #188 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
yes, just a littlebit left. I hope we find the issue. |
|
16 August 2017, 03:44 | #189 | |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
Quote:
What do you think? This is just a suggestion you could easily say no and I understand 100%. |
|
16 August 2017, 06:53 | #190 | |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
|
Quote:
This code is not very well written It will be hard to get this running on 68K as it doesn't do proper error handling and includes lots of Unix OS function calls which won't work well on Amiga 68K. For my old Amiga ports I'd normally replace all the Unix calls with Amiga OS functions. Looking at the nasty Timer code I think it would be better to just remove the entire Timer.cpp file from the project and replace the Timer.h with this: Code:
#pragma once static inline void SysClk_WaitTimer() {} static inline bool SysClk_InitTimer() { return true; } static inline void SysClk_UninitTimer() {} static inline void SysClk_StartTimerUsec(DWORD dwUsecPeriod) {} static inline void SysClk_StopTimer() {} |
|
16 August 2017, 12:58 | #191 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
16 August 2017, 20:53 | #192 | ||
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
@xboxown: of course i would try, but depends on result of AmiApple
Quote:
and there is a OS4 port by drHirudo, we still wait for the source, which would make things easier. Quote:
it reacts to input F3, etc, choose another disk, and u can exit the emulator with the close button. i've tested with ixemul v48 ( was using v63 ) does not make any difference. since using ixemul.library, using shift-F2 - doing a full emu reset, it gives a ixemul, error, before it loads the apple rom - something in memory.cpp zoned: AmiApple-Wip.lha (updated) Last edited by emufan; 16 August 2017 at 21:00. |
||
16 August 2017, 22:08 | #193 |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
drHirudo PLEASE have mercy on us and release the source code!! Please be merciful and release the code! At least email it privately to emufan so that he can look at it and do the modification!
DRHIRUDO! PLEASE help us!!! |
16 August 2017, 22:13 | #194 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
#0) btw. it does use valid dsk files only
if you choose a .bmp it says not recognized format. #1) i added some printf, just to see where it does idle. it does loop after F2 , entering MODE_RUNNING Code:
while ((g_nAppMode == MODE_RUNNING) || (g_nAppMode == MODE_STEPPING)) { printf("Applewin: g_nAppMode == MODE_RUNNING \n"); if(SDL_PollEvent(&event)) { printf("Applewin: if(SDL_PollEvent(&event) \n"); if(event.type == SDL_QUIT && event.key.keysym.sym != SDLK_F4) return; FrameDispatchMessage(&event); printf("Applewin: FrameDispatchMessage(&event) \n"); } Code:
... Applewin: g_nAppMode == MODE_RUNNING Applewin: if(SDL_PollEvent(&event) Applewin: FrameDispatchMessage(&event) Applewin: g_nAppMode == MODE_RUNNING Applewin: if(SDL_PollEvent(&event) Applewin: FrameDispatchMessage(&event) ... #2) hmm: Code:
Applewin.cpp: SDL_Event event; DiskChoose.cpp: SDL_Event event; // event DiskFTP.cpp: SDL_Event event; // event DiskFTP.cpp: SDL_Event event; // event Frame.cpp: SDL_Event event; // event #3) Code:
DiskChoose.cpp: SDL_PollEvent(&event); DiskFTP.cpp: SDL_PollEvent(&event); DiskFTP.cpp: SDL_PollEvent(&event); Frame.cpp: SDL_PollEvent(&event); i still need to check, what it actually does, entering the F2 Mode_Running. #4) updated AmiApple-WIP.lha (alot debug shell output) Last edited by emufan; 16 August 2017 at 22:48. |
16 August 2017, 23:02 | #195 |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
emufan I salute you! You are the only one who is actually going out of your way and making this work when all odds are against you! Thank you! Thank you for everything! I swear ones you get it working I want to donate to you for your time and effort! You deserve all the credit for your effort, thank you!
Also thank you for not quitting and giving up when the odds are pushing you to quit and give up. |
16 August 2017, 23:39 | #196 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
there is good help from the ppl arround, and a bit of motivation is good too
i'm stuck now with not knowing what it does when entering the emulation mode (MODE_RUNNING). I cannot find a link to starting apple code, or the emulated apple cpu. it goes into a main loop checking keyinputs, but where is the start of the apple stuff ?! and i'm not able to find the issue with the weird chars vs black screen when using F2, *sigh* #1) added some more printf. something emulation related is working already: CpuReset(), CpuIrqReset(), CpuNmireset(), CpuInitialize() #2) main loop in Applewin.cpp: void ContinueExecution() #3) thats a bit strange - maybe nothing: Code:
Memory.cpp: const UINT Apple2RomSize = 12*1024; Memory.cpp: const UINT Apple2eRomSize = Apple2RomSize+CxRomSize; Last edited by emufan; 17 August 2017 at 01:02. |
17 August 2017, 00:58 | #197 |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
That is good right, right??!
|
17 August 2017, 01:07 | #198 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
at least something to look at. we still get that weird chars when starting the emulation,
maybe it is related to the ROMs provided within the src code. zone updated: AmiApple-WIP.lha Last edited by emufan; 17 August 2017 at 01:19. |
17 August 2017, 01:13 | #199 |
Registered User
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
|
How hard is it to allow the program to add ROM from the apple2e.rom file in the hard drive?
|
17 August 2017, 01:18 | #200 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
dunno if it's worth enabling it. #1) wincompat.h does those type definitions: are those defintions valid for 68k Amiga OS? attached wincompat.h. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Porting SDL2 to Amiga | copse | request.Other | 3 | 30 November 2017 17:46 |
Porting an Amiga game to PC | CYBER_SLUNK | Coders. General | 4 | 31 January 2017 19:14 |
Porting Photoshop to Amiga | KONEY | Coders. General | 25 | 29 December 2016 23:49 |
Porting PhotoChrome ST/e to Amiga. | pandy71 | request.Other | 0 | 09 February 2015 15:12 |
Porting Qt Framework to Amiga OS enviroments | Pyromania | Coders. General | 2 | 24 July 2013 06:42 |
|
|