导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. bankbank
    3. 最佳
    • 资料
    • 关注 1
    • 粉丝 0
    • 我的积分 350
    • 主题 1
    • 帖子 6
    • 最佳 4
    • 群组 0

    bankbank 发布的最佳帖子

    • 回复: 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:

      54783113-5909-4e97-91f0-e11e3c7a420e-image.png

      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:
      871442b2-fa9b-4816-874f-3271e76b2994-image.png

      In addition, we can see the P2 damage accumulator has been modified by the game: d8360351-0166-4de7-8f67-76bedccea6b7-image.png

      In the LUA script, we can see corresponding code:
      26ec42e4-186a-4eb1-9a54-286ce6d6e620-image.png

      https://github.com/Strugglemeat/kof97/blob/main/kof97.lua

      And now when we play the game with the LUA script enabled:
      0a9af6a3-3232-4947-b2c5-1f9525c82aee-image.png

      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:
      72d3631f-a284-4d68-a322-61a8e76c6c3d-image.png

      And the same watching for conditions to trigger the rumble vibration motors:
      db317757-51a8-4c43-8392-28d6cf3687df-image.png

      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:

      dfdb2948-aac0-46e6-b6e5-49997c683a09-image.png

      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

      fc27daaa-4798-4d76-af1a-2443cc46d792-image.png

      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!

      发布在 爱搞机专区
      bankbank
      bankbank
    • 回复: Gaviar Handheld (小志掌機)

      @jordonwu 在 Gaviar Handheld (小志掌機) 中说:

      哪里能买到这款游戏机呢?

      它还没有完成。 我们正在做一些独特的事情,所以这需要时间。 全志 D1s 加振动等于兴奋!

      发布在 爱搞机专区
      bankbank
      bankbank
    • 回复: 【复刻麦当劳游戏机】用 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 f1c100s

      so 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

      发布在 Linux
      bankbank
      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 秒:
      bd9d9f6b-685f-491b-b9a9-515f168ec1b7-image.png
      如果我在调试器“BP 12BA2”中使用命令,那么执行将每秒停止一次,直到计时器达到 00 或匹配结束。 然后,该代码将不会“中断”。

      MAME 调试器可以通过以下方式作用于 RAM:
      匹配的计时器存储在地址为 0xFF4008 的 RAM 中(我通过检查其他人制作的 MAME 作弊文件发现了这一点 - 这些作弊文件是发现有用内存地址的非常有用的快捷方式)。
      “wp FF4008,1,w”
      每次程序写入这个内存地址时,执行都会停止。 w 代表写作。 您还可以提供 r 用于读取,或者同时提供 r 和 w。 1 代表 1 个字节。
      bd57854f-06e9-42a2-84b8-05b6a1721616-image.png
      309cc073-94e7-4146-b3e6-f65ae499c2f4-image.png
      使用这种类型的调试,您可以了解任何计算机程序的工作原理。 gdb是一个专业的调试程序,它有类似的操作,非常相似。

      如果您有任何问题,请毫不犹豫地提出。 我是这方面的专家,因为我已经在这方面花费了数千小时。 但我不是其他方面的专家,我想学习如何设计自己的 PCB,如何使用 LCD 屏幕的设备驱动程序,如何结合软件和硬件来做出以前没人想过的创新和独特的新事物 .

      我用的是翻译软件,如有不妥之处请见谅。

      发布在 爱搞机专区
      bankbank
      bankbank
    • 1 / 1