|
Post by mirkosoft on Aug 4, 2014 16:31:50 GMT
Hi!
When I found all possible souces to collect undocummented opcodes of 6502 and collect it into one file I was meaning I have it. I was browsing Wikipedia and in browsing I wanted to see what they're writting about C128 8502 CPU... and found unbelievable thing:
MOS 8502 has different undocummented opcodes than MOS 6502!
Really now I see that I'm again at beginning...
Knows anyone these differencies? I know that it can be in sources renamed by author - many times in collecting undocs I found more names for the same instructions... But if is there written that are other it must to be not only in names...
Miro
|
|
|
Post by mirkosoft on Aug 4, 2014 16:24:28 GMT
Hi!
I'm trying to use ROM routines to generate random number. I have to read that it will be stored in FAC#1 after generation. OK, I found these routines in C128 ROM disassembly:
JMP RND 0 AF57 44887 GENERATE RANDOM F.P. NUMBER
; Evaluate <rnd>
8434: 20 57 8C JSR $8C57 ; Get Sign
8437: 30 31 BMI $846A
8439: D0 1A BNE $8455
843B: 20 45 A8 JSR $A845 ; Set Bank 15
843E: AD 06 DC LDA $DC06
8441: 85 64 STA $64
8443: AD 07 DC LDA $DC07
8446: 85 66 STA $66
8448: AD 04 DC LDA $DC04
844B: 85 65 STA $65
844D: AD 05 DC LDA $DC05
8450: 85 67 STA $67
8452: 4C 7A 84 JMP $847A
8455: A9 1B LDA #$1B
8457: A0 12 LDY #$12
8459: 20 D4 8B JSR $8BD4 ; Unpack ROM to FAC#1
845C: A9 90 LDA #$90
845E: A0 84 LDY #$84
8460: 20 08 8A JSR $8A08
8463: A9 95 LDA #$95
8465: A0 84 LDY #$84
8467: 20 12 8A JSR $8A12 ; Add Memory At A/Y
846A: A6 67 LDX $67
846C: A5 64 LDA $64
846E: 85 67 STA $67
8470: 86 64 STX $64
8472: A6 65 LDX $65
8474: A5 66 LDA $66
8476: 85 65 STA $65
8478: 86 66 STX $66
847A: A9 00 LDA #$00
847C: 85 68 STA $68
847E: A5 63 LDA $63
8480: 85 71 STA $71
8482: A9 80 LDA #$80
8484: 85 63 STA $63
8486: 20 B6 88 JSR $88B6
8489: A2 1B LDX #$1B
848B: A0 12 LDY #$12
848D: 4C 00 8C JMP $8C00 ; Pack FAC#1 to RAM1 Now it looks like when is packed FAC#1 to RAM1, old value contains still FAC#1 - but it's not true, so I tried to use after generation immediatelly to use Unpack RAM1 to FAC#1:
; Unpack RAM1 to FAC#1
AF60: 4C 85 7A JMP $7A85
; Unpack RAM1 to FAC#1
7A85: 85 24 STA $24
7A87: 84 25 STY $25
7A89: A0 00 LDY #$00
7A8B: 20 B7 03 JSR $03B7 ; Index1 Indirect Fetch From RAM Bank 1
7A8E: 85 63 STA $63
7A90: 84 71 STY $71
7A92: C8 INY
7A93: 20 B7 03 JSR $03B7 ; Index1 Indirect Fetch From RAM Bank 1
7A96: 85 68 STA $68
7A98: 09 80 ORA #$80
7A9A: 85 64 STA $64
7A9C: C8 INY
7A9D: 20 B7 03 JSR $03B7 ; Index1 Indirect Fetch From RAM Bank 1
7AA0: 85 65 STA $65
7AA2: C8 INY
7AA3: 20 B7 03 JSR $03B7 ; Index1 Indirect Fetch From RAM Bank 1
7AA6: 85 66 STA $66
7AA8: C8 INY
7AA9: 20 B7 03 JSR $03B7 ; Index1 Indirect Fetch From RAM Bank 1
7AAC: 85 67 STA $67
7AAE: 60 RTS Then I tried to read FAC#1, never success - always contains the same values - 0,0,0,103 Generation, unpacking and viewing result I did by BASIC line:
SYS33844:SYS44896:?PEEK(100);PEEK(101);PEEK(102);PEEK(103)
Never success... where I do the mistake?
Miro
|
|
|
Post by mirkosoft on Jul 27, 2014 7:06:24 GMT
Hi Robert!
OK, but this matrix of C128 keyboard I know. These Qs were about VICE mapping, no real machine.
For now I must to say only I'm sad. But for now I have at least enough info what it does and what not... I'll try contact one of VICE developer or I add feature request (but this is slow, they have lot of work, for example in case x128 was not fixed VIA problem for FD-2000/4000 so long time that it looks endless).
Thank you.
Miro
|
|
|
Post by mirkosoft on Jul 26, 2014 20:35:37 GMT
Win+L solved - by AutoHotKey...
I forgot last Qs: I have mapped cursor keys (left to FN keys) to arrow keys of PC keyboard. In case of C64 emulation (except 64 mode of 128) I must to have mapped CRSR LR and CRSR UD to other keys...
Is possible to have mapped at arrow keys of PC keyboard CRSR keys with 128 cursor keys together?
My layout is there this:
90 0 7 257 /* Up -> Up */
90 10 3 8 /* Up -> Up */
92 0 2 257 /* Left -> Left */
92 10 5 8 /* Left -> Left */
93 0 2 264 /* Right -> Right */
93 10 6 8 /* Right -> Right */
95 0 7 264 /* Down -> Down */
95 10 4 8 /* Down -> Down */
And I'm using the same layout for all VICE machines...
Thank you for all.
Miro
|
|
|
Post by mirkosoft on Jul 26, 2014 20:06:16 GMT
Hi!
I'm back after ~month without PC - only my C128 was working...
I tried to remap VICE symbolic keymap using advices from Robert Willie and others.
As first I used AutoHotKey software to remap some keys this way:
lCtrl = lCtrl
rCtrl = lCtrl
lWin = Menu
rWin = Menu
lAlt = rCtrl
AltGr = rCtrl
Left and Right Control is used as Control key, Left and Right Windows is used as Commodore key, Alt and AltGr are used as Alt key, Apps key is used only for VICE Alt hotkeys.
Now I'm waiting for Japanese 109 key keyboard (I have prepared all Slovak and Commodore stickers) and have few Qs which I solved not to this date:
Every VICE user knows that Caps Lock key can be used in 128 emulation as CAPS LOCK/ASCII(DIN-CC) key - works normally like Caps is down. I wanted to use Scroll Lock as SHIFT LOCK - problem is that Scroll Lock state "active" means not the same as Caps Lock. I wanted use Num Lock as 40/80 Display key - the same problem as Scroll Lock
When we look at symbolic keymap: # CAPS (ASCII/DIN) key 58 -4 1 /* Caps Lock -> CAPS */
#69 -1 -1 0 /* NumLock */ #70 -1 -1 0 /* Scroll Lock */
Here's mapping value -4 this I don't know what is really other (of course # means not used amd -1 is "no key").
# Negative row values:
# 'keysym -1 n' joystick #1, direction n
# 'keysym -2 n' joystick #2, direction n
# 'keysym -3 0' first RESTORE key
# 'keysym -3 1' second RESTORE key
# 'keysym -4 0' 40/80 column key
# 'keysym -4 1' CAPS (ASCII/DIN) key Maybe negative values means that's switcher - so when I add to 40/80 key Num Lock value 69 why it works not like Caps Lock? It works only while I'm holding down Num Lock... or remap 2nd Restore key to SHIFT LOCK or 40/80 DISPLAY ?
In my keymap is used = key like on TED Series keyboard, but only Pi - is shifted, real TED keyboard has Pi used with Commodore key and Arrow Left is shifted. This I did by help of Robert Willie: 43 6 5 40 /* \ -> = */
43 6 6 1 /* Shift+\ -> Pi */
and the same proceeding I used in Shift + 0 - Arrow Up key again inspired by TED Series:
11 4 3 40 /* 0 -> 0 */
11 6 6 0 /* Shift+0 -> Arrow Up */
That's ok, but I want to remap = key to use with shift Left Arrow (no problem only exchange Pi with it), but how to remap Pi to use with Commodore key? This I don't know.
Finally - I'm using Windows 8.1 (before Windows 8 I used only XP - never upgraded to Vista or 7). Since Windows 8 is keystroke Win+L lock workstation. When I leave it enabled, it's easy to lock desktop by simple mistake, so I disabled it. Then it looks like combination Win+L is dead key. But it's not - with AutoHotKey is possible to map there other function or character (I'm from Slovakia and my customized layout has there Polish character L (Ł) - this is Slovak standard). I tried to remap keystroke Win+L to other key e.g. Del (this I have attached for L key in VICE layout 'cause CBM+L works not), so Q is here:
Is VICE mapping keys by hardware? It looks so in case of Win+L, looks not in case remapping Ctrl,Alt,Win and other modifiers... but in case remapping by AutoHotKey holding down Shift works not - so again looks so.
So, what's truth? VICE maps by hardware or by software and here comes new Q - is possible to use with VICE Japanese 109 key keyboard? If, how?
At end of this post I give summary of Qs and little info about The Ace:
How to map any key for use with Commodore key? (like can be remapped with using shift without Matrix change) How to map Scroll Lock and Num Lock like Caps Lock as SHIFT LOCK or 40/80 DISPLAY - not only by holding it down ? How to map keystroke Win+L (in this case CBM+L) - in Windows XP it was working, in 8.0 and 8.1 not ?
Info: The Ace progress looks good... I prepqared live blog for daily info and user comments and reactions, when it will be possible I give there first report and give link.
Thank you for all help, reading it and also for replies and comments.
Miro
|
|
|
Post by mirkosoft on Jun 28, 2014 23:56:41 GMT
I tested v2 - now it scroll text correctly. But main problem is always the same - jerkiness.
Tested on C128DCR (VDC8568 aka Rev2)
Miro
|
|
|
Post by mirkosoft on Jun 25, 2014 21:43:10 GMT
Hi!
Jerkiness and no scroll - only in one 8 pixels repeating letters - no full scrolling...
Tomorrow I'll test version 2, it's late evening and I'm without energy (lot of furniture I was moving).
Miro
|
|
|
Post by mirkosoft on Jun 25, 2014 6:27:00 GMT
I tested version 1 only on my DCR (VDC8568 - Rev.2). Works not. Only in VICE is scroller running.
Miro
|
|
|
Post by mirkosoft on Jun 23, 2014 16:49:07 GMT
So, I forgot to write that really possible is LOAD&RUN C64 software from C128 native mode switching to 64 mode without GO64 or reset.
I modified program Serendipity by Joseph Shaughnessy to use it universally... It loads selected program then switches to 64 mode and run it...
So, my dream GO128, turning off SCPU by software is maybe not so unreal like everytime is meaning... still only dream...
|
|
|
Post by mirkosoft on Jun 17, 2014 14:34:26 GMT
Hi!
I'm searching for C64 cartridge image of CP/M 2.2 with built-in Z80 CPU - really don't know if exists, there's used new CPU and it's not easy to do any functionality. I mean in VICE will not work, but if I can't to try it, I can't to give suggestion for VICE developers.
If anybody has CRT or ROM or BIN image, please create link to download it.
Thank you for everything!
Miro
|
|