bankbank 发布的帖子
-
回复: Gaviar Handheld (小志掌機)
@lovexulu 在 68000 CPU NEOGEO 程序中,有两个主要元素:ROM 和 RAM
ROM:程序员在 1990 年代编写的代码。 它改变 RAM 的值,并跳转到 ROM 上的新区域。 它的代码,说明。
RAM:内存中的临时值。 如果我使用造成 10 点伤害的特殊攻击,那 10 点必须存储在临时内存中的某个地方。
在任何计算机中,操作都是完全相同的:在“P.C.”处计算当前指令。 程序计数器。 完成那个之后,去下一个。 唯一的变化是指令是否跳转到或分支到某个不同的区域。 否则,我们将始终转到下一条指令。 继续一个接一个地吃,就像吃零食一样,不断地。 这通常是 ROM(有时可以从 RAM 中以这种方式执行代码)。
MAME 调试器可以通过以下方式作用于 ROM:
BP“断点”
如果仿真器发现 CPU 当前为“P.C.” 程序计数器匹配用户请求的 BP 命令,执行将完全停止。 例如,在 Marvel vs Capcom 1 CPS2 中,PC=0x12BA2 处的代码将导致游戏计时器减少 1 秒:
如果我在调试器“BP 12BA2”中使用命令,那么执行将每秒停止一次,直到计时器达到 00 或匹配结束。 然后,该代码将不会“中断”。MAME 调试器可以通过以下方式作用于 RAM:
匹配的计时器存储在地址为 0xFF4008 的 RAM 中(我通过检查其他人制作的 MAME 作弊文件发现了这一点 - 这些作弊文件是发现有用内存地址的非常有用的快捷方式)。
“wp FF4008,1,w”
每次程序写入这个内存地址时,执行都会停止。 w 代表写作。 您还可以提供 r 用于读取,或者同时提供 r 和 w。 1 代表 1 个字节。
使用这种类型的调试,您可以了解任何计算机程序的工作原理。 gdb是一个专业的调试程序,它有类似的操作,非常相似。如果您有任何问题,请毫不犹豫地提出。 我是这方面的专家,因为我已经在这方面花费了数千小时。 但我不是其他方面的专家,我想学习如何设计自己的 PCB,如何使用 LCD 屏幕的设备驱动程序,如何结合软件和硬件来做出以前没人想过的创新和独特的新事物 .
我用的是翻译软件,如有不妥之处请见谅。
-
回复: Gaviar Handheld (小志掌機)
In order to accomplish the vibration function, which never previously existed in this game's programming, we need to build it into the emulator. We must constantly watch several areas in RAM, and based on the conditions, we will execute vibration on the left, right, or both simultaneously. It's still not yet determined whether there will be another parameter regarding intensity of vibration, that will come later.
Here are a few locations in RAM we will continuously monitor:
0x10843B (byte) - P2 damage accumulator - when P1 hits P2, the value of the damage will be added here (normally 0x00)
0x108102 (word) - P1 move pointer - when P1 does a move, this will reflect the unique BP (normally 0xF464)
0x108175 (byte) - P1 trigger - if P1 move pointer isn't enough or needs restriction, this byte will work. I believe it's a pointer to which animation is playing for P1.For discovering conditions, debugging, and preliminary testing, I will use MAME emulator with LUA scripting. Let's take the character 'Daimon' for example:
I am using this MAME cheat file so I can have infinite time, infinite super meter, P2 infinite HP https://github.com/Strugglemeat/kof97/blob/main/kof97.xml
When Daimon is doing his HCB+C throw, 0x108102 will be as follows:
In addition, we can see the P2 damage accumulator has been modified by the game:
In the LUA script, we can see corresponding code:
https://github.com/Strugglemeat/kof97/blob/main/kof97.lua
And now when we play the game with the LUA script enabled:
We can see a box has been drawn on the right side, indicating that this is where vibration should happen.
Ultimately, we do not want to draw boxes in MAME on our PC, we want to feel vibration in the Gaviar handheld. So now we need to port this logic to the gngeo emulator which will run on the Allwinner D1s SoC.
https://github.com/Strugglemeat/gngeo/blob/master/src/rumble.c
Within this file, we can see reading of the same bytes as the LUA script:
And the same watching for conditions to trigger the rumble vibration motors:
Discovering these triggers takes about 2 hours per character. If other people want to contribute, it would be very helpful, since there are about 30 characters. Here you can see a finished Kyo super/special move set for LUA, which needs to be ported to gngeo:
https://docs.google.com/spreadsheets/d/18-3FkS40NmaozHA6sqhKlpHiS5KeQoTrdatqnMOBWYY/edit?usp=sharing
For more information, you can look at the lower pages of this document to see more:
https://docs.google.com/document/d/1g9EnpCVbQXWMn-xd5w0bgmlUGuHL5kMT-kHZRkNL0VY/edit?usp=sharing
Thank you for your interest in this project, and I hope one day you can enjoy the feeling of KoF '97 rumbling in your hands!
-
回复: 【复刻麦当劳游戏机】用 ST7789V LCD 在 lichee pi nano (f1c100s)
@lovexulu hey lovexulu, thanks for the information. I'm looking to learn exactly how to do what you describe, so thanks for pointing me in the right direction.
someone has shared with me some st7789 display driver code
https://github.com/MiyooCFW/kernel/blob/master/drivers/video/fbdev/st7789sfb.c
this comes from the miyoo 游戏机 that also uses f1c100sso maybe if I drop this st7789sfb.c file in
licheenano/licheepi-nano-lcd/buildroot/dl/linux/git/drivers/video/fbdev/and then make buildroot it'll bring it in? or do I need to explicitly declare the file somewhere?
more information about using this display with miyoo cfw:
https://github.com/MiyooCFW/kernel/blob/master/Documentation/devicetree/bindings/display/panel/sitronix%2Cst7789v.txt -
回复: 【复刻麦当劳游戏机】用 ST7789V LCD 在 lichee pi nano (f1c100s)
@steward 真棒, here's the information regarding the LCD pinout:
-
【复刻麦当劳游戏机】用 ST7789V LCD 在 lichee pi nano (f1c100s)
大家好。 我是一个外国人,对不起我中文一点不好
我买 lichee pi nano (f1c100s), 用这个 buildroot https://github.com/mclewell/licheepi-nano-lcd
here is the display I am using:
now, when I power on the system, nothing appears on the display
what should I do to use this LCD display on the lichee pi nano?
I want to create a 游戏机 using this 麦当劳 outer shell:
I am a big fan of allwinner arm soc, they are very power efficient and cost effective
总功耗极低,效率高
https://jaycarlson.net/embedded-linux/#1602627646108-72e75a29-4918
please help me figure out how to connect this 40-pin LCD to my lichee pi nano board. it can use SPI or MCU/CPU
thank you very much for your help!
bankbank