Posté le 10/09/2020 09:25
Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2024 | Il y a 127 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements
Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd
Citer : Posté le 12/09/2020 11:17 | #
Aha so you got there faster than me, thank you. I was automating this change on ML_display_vram(). Unfortunately this is not enough yet, this version of Jetpack kinda works but really doesn't. The display is shifted suspiciously to the bottom, and there are a lot of visual artifacts. Turning the calc (screen) on and off restores the parameters but this is definitely not usable.
Jetpack's code might use other direct-DD functions, I'll keep looking into that.
Citer : Posté le 12/09/2020 12:10 | #
I found ML_vram_adress(); at 0x008ed8 to 0x008ef2
I found ML_clear_vram(); at 0x008ef4 to 0x008f4e
I found ML_display_vram(); at 0x008f50 to 0x008fc2
I found ML_pixel(); at 0x008fc4 to 0x00904e
I couldn't find ML_clear_display(); - He mustn't have used it (commented out the #define)
008ed8 4f22 sts.l pr, @-r15
008eda e700 mov #H'0, r7
008edc d336 mov.l @(H'd8,pc), r3 ;@(H'8fb8)
008ede 6673 mov r7, r6
008ee0 9267 mov.w _GetVRAMAddress,r2 ;@(H'8fb2)
008ee2 6573 mov r7, r5
008ee4 6033 mov r3, r0
008ee6 2f26 mov.l r2, @-r15
008ee8 400b jsr @r0
008eea 6473 mov r7, r4
008eec 7f04 add #4, r15
008eee 4f26 lds.l @r15+, pr
008ef0 000b rts
008ef2 0009 nop
; ---------------- ML_vram_adress();
; ---------------- ML_clear_vram();
008ef4 2fd6 mov.l r13, @-r15
008ef6 4f22 sts.l pr, @-r15
008ef8 bfee bsr H'-24 ;@(H'8ed8) ML_vram_adress();
008efa 0009 nop
008efc 6703 mov r0, r7
008efe e004 mov #H'4, r0
008f00 3078 sub r7, r0
008f02 e603 mov #H'3, r6
008f04 2609 and r0, r6
008f06 6d73 mov r7, r13
008f08 e400 mov #H'0, r4
008f0a 6143 mov r4, r1
008f0c 4615 cmp/pl r6
008f0e 8f05 bf/s H'a ;@(H'8f1c)
008f10 6573 mov r7, r5
008f12 7101 add #1, r1
008f14 2540 mov.b r4, @r5
008f16 3163 cmp/ge r6, r1
008f18 8ffb bf/s H'-a ;@(H'8f12)
008f1a 7501 add #1, r5
008f1c 904a mov.w @(H'94,pc), r0 ;@(H'8fb4)
008f1e 6163 mov r6, r1
008f20 317c add r7, r1
008f22 6513 mov r1, r5
008f24 301c add r1, r0
008f26 2542 mov.l r4, @r5
008f28 7504 add #4, r5
008f2a 3502 cmp/hs r0, r5
008f2c 8bfb bf H'-a ;@(H'8f26)
008f2e 9241 mov.w @(H'82,pc), r2 ;@(H'8fb4)
008f30 362c add r2, r6
008f32 3d6c add r6, r13
008f34 e603 mov #H'3, r6
008f36 2679 and r7, r6
008f38 6743 mov r4, r7
008f3a 4615 cmp/pl r6
008f3c 8f05 bf/s H'a ;@(H'8f4a)
008f3e 65d3 mov r13, r5
008f40 2540 mov.b r4, @r5
008f42 7701 add #1, r7
008f44 3763 cmp/ge r6, r7
008f46 8ffb bf/s H'-a ;@(H'8f40)
008f48 7501 add #1, r5
008f4a 4f26 lds.l @r15+, pr
008f4c 000b rts
008f4e 6df6 mov.l @r15+, r13
; ---------------- ML_clear_vram();
; ---------------- ML_display_vram();
008f50 2fc6 mov.l r12, @-r15
008f52 2fb6 mov.l r11, @-r15
008f54 2fa6 mov.l r10, @-r15
008f56 2f96 mov.l r9, @-r15
008f58 4f22 sts.l pr, @-r15
008f5a bfbd bsr H'-86 ;@(H'8ed8) ML_vram_adress();
008f5c 0009 nop
008f5e 6c03 mov r0, r12 ; Vram address
008f60 d516 mov.l _LCD_reg_sel, r5 ;@(H'8fbc)
008f62 e940 mov #64, r9 ; rows
008f64 d416 mov.l _LCD_data_reg, r4 ;@(H'8fc0)
008f66 ea10 mov #16, r10 ; cols
008f68 eb0a mov #10, r11 ; 7
008f6a e104 mov #4, r1 ; 0
008f6c e708 mov #8, r7 ; 4
008f6e 6013 mov r1, r0
_Row:
008f70 2570 mov.b r7, @r5
008f72 e280 mov #-128, r2 ; 192
008f74 220b or r0, r2
008f76 66a3 mov r10, r6
008f78 2420 mov.b r2, @r4
008f7a 2570 mov.b r7, @r5
008f7c 2410 mov.b r1, @r4
008f7e 25b0 mov.b r11, @r5
_Col:
008f80 63c4 mov.b @r12+, r3
008f82 4610 dt r6
008f84 8ffc bf/s _Col ;@(H'8f80)
008f86 2430 mov.b r3, @r4
008f88 7001
008f8a 3093 cmp/ge r9, r0
008f8c 8bf0 bf _Row ;@(H'8f70)
008f8e 4f26 lds.l @r15+, pr
008f90 69f6 mov.l @r15+, r9
008f92 6af6 mov.l @r15+, r10
008f94 6bf6 mov.l @r15+, r11
008f96 000b rts
008f98 6cf6 mov.l @r15+, r12
008f9a e306 mov #6, r3
008f9c d207 mov.l _LCD_reg_sel, r2 ;@(H'8fbc)
008f9e 2230 mov.b r3, @r2
008fa0 d107 mov.l _LCD_data_reg, r1 ;@(H'8fc0)
008fa2 000b rts
008fa4 2140 mov.b r4, @r1
008fa6 e306 mov #6, r3
008fa8 d204 mov.l _LCD_reg_sel ,r2 ;@(H'8fbc)
008faa 2230 mov.b r3, @r2
008fac d104 mov.l _LCD_data_reg, r1 ;@(H'8fc0)
008fae 000b rts
008fb0 6010 mov.b @r1, r0
_GetVRAMAddress:
008fb2 0135 .DATA.W H'0135 ; GetVRAMAddress(); SYSCALL
008fb4 03fc .DATA.W H'03FC ; Used in ML_clear_vram();
008fb6 0000 .DATA.W H'0000 ; 4 align
_SYSCALL_ADDRESS:
008fb8 0032 .DATA.L H'0032130C ; Used in ML_vram_address(); (char*)((*SysCall)(0, 0, 0, 0, 0x0135));
008fba 130c
_LCD_reg_sel:
008fbc b400 .DATA.L H'B4000000 ; *LCD_register_selector
008fbe 0000
_LCD_data_reg:
008fc0 b401 .DATA.L H'B4010000 ; *LCD_data_register
008fc2 0000
; ---------------- ML_display_vram();
; ---------------- ML_pixel();
008fc4 2fe6 mov.l r14, @-r15
008fc6 6e43 mov r4, r14
008fc8 2fd6 mov.l r13, @-r15
008fca 6d53 mov r5, r13
008fcc 4f22 sts.l pr, @-r15
008fce 7ffc add #H'fc, r15
008fd0 bf82 bsr H'-fc ;@(H'8ed8)
008fd2 2f62 mov.l r6, @r15
008fd4 e280 mov #H'ffffff80, r2
008fd6 22e8 tst r14, r2
008fd8 8f35 bf/s H'6a ;@(H'9046)
008fda 6603 mov r0, r6
008fdc e1c0 mov #H'ffffffc0, r1
008fde 21d8 tst r13, r1
008fe0 8b31 bf H'62 ;@(H'9046)
008fe2 64d3 mov r13, r4
008fe4 957f mov.w @(H'fe,pc), r5 ;@(H'90e6)
008fe6 63e3 mov r14, r3
008fe8 60f2 mov.l @r15, r0
008fea 4408 shll2 r4
008fec 4408 shll2 r4
008fee 4321 shar r3
008ff0 4321 shar r3
008ff2 4321 shar r3
008ff4 343c add r3, r4
008ff6 346c add r6, r4
008ff8 e307 mov #H'7, r3
008ffa 23e9 and r14, r3
008ffc 633b neg r3, r3
008ffe 8801 cmp/eq #H'1, r0
009000 8d08 bt/s H'10 ;@(H'9014)
009002 453c shad r3, r5
009004 8800 cmp/eq #H'0, r0
009006 8908 bt H'10 ;@(H'901a)
009008 8802 cmp/eq #H'2, r0
00900a 890a bt H'14 ;@(H'9022)
00900c 8803 cmp/eq #H'3, r0
00900e 890c bt H'18 ;@(H'902a)
009010 a019 bra H'32 ;@(H'9046)
009012 0009 nop
009014 6340 mov.b @r4, r3
009016 a011 bra H'22 ;@(H'903c)
009018 235b or r5, r3
00901a 6557 not r5, r5
00901c 6340 mov.b @r4, r3
00901e a00d bra H'1a ;@(H'903c)
009020 2359 and r5, r3
009022 6140 mov.b @r4, r1
009024 215a xor r5, r1
009026 a00e bra H'1c ;@(H'9046)
009028 2410 mov.b r1, @r4
00902a e601 mov #H'1, r6
00902c 2d69 and r6, r13
00902e 2e69 and r6, r14
009030 2dea xor r14, r13
009032 2dd8 tst r13, r13
009034 8904 bt H'8 ;@(H'9040)
009036 6557 not r5, r5
009038 6340 mov.b @r4, r3
00903a 2359 and r5, r3
00903c a003 bra H'6 ;@(H'9046)
00903e 2430 mov.b r3, @r4
009040 6140 mov.b @r4, r1
009042 215b or r5, r1
009044 2410 mov.b r1, @r4
009046 7f04
009048 4f26 lds.l @r15+, pr
00904a 6df6 mov.l @r15+, r13
00904c 000b rts
00904e 6ef6 mov.l @r15+, r14
; ---------------- ML_pixel();
0xB401000 only shows up once in the entire addin (at 0x008FC0)
0xB400000 shows up twice. Once at 0x008fbc and second time at 0x020e8e
But I couldn't find any references to the 2nd occurrence
Citer : Posté le 12/09/2020 12:21 | #
ML_clear_vram() and ML_pixel() are irrelevant here, they don't use the DD.
You seem to have missed ML_set_contrast() and ML_get_contrast() at 8f9a and 8fa6. I disabled both by removing every access to the display registers, which solves the contrast issue for the title screen only. Still contrast issues everywhere else and every frame is displayed starting at row 4 so 4 rows at the top still display the main menu and 4 rows of Jetpack Joyride are invisible.
There seems to be no reference to the second occurrence indeed.
I have confirmed that the modified ML source works on the Graph 35+E II when compiled with GCC. So it must be specific to the SDK setup or Jetpack itself.
Citer : Posté le 12/09/2020 13:24 | # | Fichier joint
Got it to work for no obvious apparent reason after using instruction variants. I don't have time to investigate right now...
---
La version de Jetpack ci-joint est compatible Graph 35+E II. Est-ce que quelqu'un peut faire un test complémentaire avant que Goldsheep l'ajoute à la liste ?
Citer : Posté le 12/09/2020 13:31 | #
Je l'ai testé et il fonctionne bien .
Citer : Posté le 12/09/2020 13:50 | # | Fichier joint
Fonctionne très bien pour moi aussi, y a-t-il un lien vers la page du programme, que je puisse l'ajouter ?
Citer : Posté le 12/09/2020 21:38 | #
Par ici : Jetpack Joyride
Si tu veux bien, renomme-le JetpackJ.g1a avant de l'ajouter en fichier joint de ton commentaire. J'ai utilisé des noms différents pendant le test mais maintenant il faut revenir à celui d'origine !
Citer : Posté le 13/09/2020 00:27 | #
- 2048 Deluxe
- Pokemon Stadium
Fonctionne Pas Dommage .
Citer : Posté le 13/09/2020 02:38 | #
I totally didn't see the ML_set_contrast() and ML_set_contrast()
I recognized that part of the code wasn't from ML_display_vram(), but I just didn't think anything about it
I must have been too tired
I still don't get why changing 008f74 220b or r0, r2 to 008f74 320c add r0, r2 would fix anything
The max r0 could be is 0x3F which when ORed or ADDed with 0xFFFFFF80 should result with 0xFFFFFFBF (0xFFFFFFF with 0xFFFFFC0) which doesn't cause any overflow
I did forget about changing 008f6e 6013 mov r1, r0 to 008f6e e000 mov #h'0, r0.
Which was the reason for the screen not displaying anything on the top 4 rows
Citer : Posté le 13/09/2020 08:40 | #
Thanks for your analysis. I also don't see why any of these statements have an effect. mov #0, r0 is the same as mov r1, r0 since r1 is initialized to 0 in the same basic block two instructions above. And as you mentioned, or and and are identical here.
(Actually both modifications result from an attempt from me to count rows from 0x7c up instead of from 0x80 up. In this situation the add makes sense. It worked, but omitted four rows on top, so I put mov #0, r0 again and this time it worked normally. I don't know yet why r1=4 initially.)
Also the flickering on the screen was due to the 4 extra rows at the bottom, I confirmed that setting the limit from 64 to anything smaller than 60 (while keeping the offset problem) solved that part. Maybe that extra RAM is used for other settings or whatever.
Citer : Posté le 14/09/2020 11:32 | # | Fichier joint
mov #0, r0 is the same as mov r1, r0 since r1 is initialized to 0
Which caused the offset by 4 bug
What decompiler and recompiler/hex editor do you use?
Top Left: Original Jetpackj.g1a
Top Right: Fixed Jetpackj.g1a
Bottom Left: Original Fruitnin.g1a
Bottom Right: Fixed Fruitnin.g1a // My attempt at fixing FruitNinja
Citer : Posté le 14/09/2020 11:39 | #
Which caused the offset by 4 bug
Aaah I got pwned by my own modification of the code and did not even realize it. Thank you for spotting it. xD
Now let's work on automating all of this. I would like to have two levels of compatibility:
• Binary compatibility: for add-ins which provide the source code, rebuild with a compatible version of MonochromeLib (detect GIII by OS version major number = 3) and continue shipping a single binary for all SH4 platforms.
• Binary edition: for add-ins which don't provide the source code, automate the detection of MonochromeLib functions and rewrite them. Ship an additional binary for GIII models only.
Because compiled MonochromeLib functions have references to PC-relative data and the offsets depend on how many MonochromeLib functions are compiled in, it won't be possible to detect a constant byte sequence, and that wouldn't be robust either. I'm considering using my fxos disassembler which does the binary work for us, though it will required some work.
If possible, it would be best to start by porting add-ins that have source code.
Citer : Posté le 18/09/2020 00:53 | # | Fichier joint
Heres a pic of what I changed
Left is the original SH4 Wolfenst: Right is my attempted fix
Citer : Posté le 18/09/2020 10:56 | #
Thank you. This still seems to reset the display on my Graph 35+E II (blank screen but no reboot). There doesn't seem to be other direct-display access. Will have to look deeper into this one.
Citer : Posté le 18/09/2020 12:33 | # | Fichier joint
Since @Moutaindew asked for doom in Installer et jouer à des jeux de type add-in sur une graph 35+ e II
I very quickly made a (possibly*) compatible Graph 35+eII Wolfenstein 3D Addin: Wolfenst.g1a
Based on the SH4 download (2nd link)
(oops. deleted my post by mistake)
But it was not in vain!
As I take this opportunity to reupload the file (but with modifcation): Wolfenst.g1a
I took a guess as to why it still wasn't working and I think I've found the problem! (It just looks like the possibility of automating this keeps getting harder and harder)
Citer : Posté le 19/09/2020 03:14 | #
Terrario is now compatible with the Graph 35+E II
Citer : Posté le 19/09/2020 13:14 | #
Hey can someone try to fix FXGnuBoy for the graph 35+ EII please ?
Citer : Posté le 21/09/2020 12:06 | #
Your port mostly works now Redcmd, thank you! I checked your file, I see you removed the reg=1, data=1 command which sets increment mode. As we discussed earlier this command is indeed no longer used in the new driver.
I can now start the add-in and play the game, although pressing EXIT during a stage crashes the calculator. I have checked that the crash also occurs with the currently-available SH4 download on my Graph 75+E. This is thus a completely different bug, so your version is indeed a port of the current version for the Graph 35+E II.
I added the file to the game's page with credit. Thanks!
Ajouté le 21/09/2020 à 12:07 :
Also you should be able to test with the Graph 35+E II emulator: https://www.planet-casio.com/Fr/logiciels/voir_un_logiciel_casio.php?cat=7
This probably will save you some time waiting for me! ^^"
Citer : Posté le 21/09/2020 12:47 | #
I can confirm the SH4 version crashes my fx-9750GII when exiting the game
Thanks for adding the credit
(BTW I capitalise CMD: RedCMD)
Citer : Posté le 21/09/2020 13:37 | #
Hey can someone try to fix FXGnuBoy for the graph 35+ EII please ?
J'ai contacté l'auteur, c'est un add-in gint donc c'est compatible au même titre que Terrario - il devrait suffire de recompiler le programme avec la version corrigée de gint que j'ai publiée il y a quelques jours.
Thanks for adding the credit
(BTW I capitalise CMD: RedCMD)
You're welcome! I adjusted the capitalization.
Ajouté le 01/12/2020 à 17:17 :
Comme demandé sur ce topic, voici une version modifiée de MonochromeLib pour Graph 35+E II : MonochromeLib-35E2.zip.
Les modifications sont assez directes :
• Renommage des registres : 4→8, 7→10
• X-Address commence à 128 et pas 192
• Y-Address commence à 4 et pas 0
• On vire les fonctions de contraste, qui ne marchaient déjà pas bien avant
Si on peut linker ça dans le post principal ce serait pas mal je pense
Citer : Posté le 01/12/2020 18:30 | #
C'est bon j'ai linké ça dans le post principal
Je vais essayer de porter moi-même des add-in mais, les créateurs d'add-in, si vous voyez ce post, portez vos add-in siouplaît