@neotendo
It only happened in old kernel source and has been fixed already.@暈哥
第6頁的那個連結無法按下,幫忙看下,感謝啦~
Old source? But i compiled your source, is that old source?
离线
@neotendo
Make sure we are on the same page. How did you know this issue ?
What? You mean fba? I was playing a game and wanted load another rom, but "I" menu key did nothing.
I compiled the kernel source from you via wget from your github
离线
As I known, it should be "SELECT + START + L" for FBA menu.
I press START+SELECT and i got this menu, thank you for the hint.
离线
@neotendo
You can try latest port of the FBA: https://github.com/Rezzy-dev/fba-miyoo-playable/releases/tag/release
It fixes some stuff and you can open Menu with RESET button. For recompiling use Miyoo toolchain from steward's repo.
离线
@Situ
a friend of mine brought an FC3000 v2 IPS, can i use the dump image you gave me to dump his stock rom.
he wants linux on his too, but i want to backup his stock rom first for safety reasons.
最近编辑记录 neotendo (2022-09-03 05:20:16)
离线
@neotendo
Yes, you can.
Make sure the dumped file is different with original one.
Even though you can dump from SPI flash successfully, but I cannot make sure it can be restored back to normal always, therefore, it is recommended not to touch any data saved in SPI flash for safety reason.
If your friend can port Linux OS on FC3000 IPS v2 and then share with us, we are really appreciate all of efforts.
离线
@司徒
Ok, thank you. I has to port it again, my friend has nothing to do with programming.
PS: i have a tl866 eprom reader/writer, i can dump and write the spi flash with that device in theory or not?
最近编辑记录 neotendo (2022-09-03 14:55:05)
离线
@neotendo
You ? ha ha, sound great !
According to the spec of TL866, it can dump data from SPI flash and supports W25QXXX used in FC3000.
Yeah, me hahaha, i only need the display initial code as i learned.
I tried your lcd test image and i got garbage on screen, ips linux image shows nothing only backlight.
I must see how i can read the flash, in circuit or desolder it and try to solder pins on or something, as i do not have such adapter.
最近编辑记录 neotendo (2022-09-03 22:15:03)
离线
@Situ
I see it coming and i need your help at the end again 😄
Disasembled the FC3000, found nothing about the LCD (WL-26 or 28 H105-A1)
最近编辑记录 neotendo (2022-09-05 23:29:18)
离线
Just saw you already have an wl-28h105-a1 stock dump on github. Only need to figure out what driver this display use
离线
@Hox
Do you still have your FC3000 and have you tried my Linux version?
离线
@Hox
Do you still have your FC3000 and have you tried my Linux version?
No, I've already thrown it out.
离线
@neotendo
Yes, the LCD panel is same as my IPS FC3000.
Unfortunately, it has been put into Taiwan garbage truck gracefully...
The possible way to initialize the LCD panel properly is to collect all of LCD models and then try each initial code on this device.
离线
@neotendo
Yes, the LCD panel is same as my IPS FC3000.
Unfortunately, it has been put into Taiwan garbage truck gracefully...The possible way to initialize the LCD panel properly is to collect all of LCD models and then try each initial code on this device.
hahaha, farewell FC3000.
i tried already some init codes, only st7789 in swap RB order give me some garbage on screen and i can see that your test program tries to write data on the left side (the RGB stripes), but they are all Black and White
最近编辑记录 neotendo (2022-09-06 16:23:56)
离线
Update: Looks like a i am on the right track, shot was taken during RGB Stripes Drawing. I edit the ST7789 initial code in RB Swap order.
离线
@Situ
Thank you very much <3
I present you..... DOOM runing on the FC3000 V2 IPS (WL-28H105-A1) but guess what, the buttons are mapped different or my keyboard.c code is messed up.
feels like L1 is strafe left and SELECT, R1 is strafe right and START at the same time in Doom.
START and SELECT do nothing in Doom.
and I noticed with both FC3000 that the image has tearing, as if no vsync is on or something. can we fix that?
最近编辑记录 neotendo (2022-09-06 18:51:13)
离线
Wow, amazing !
Since such LCD panel lacks of tearing signal, it is not possible to fix.
I think you have done the best thing that Linux OS can run on FC3000 handheld and you also extended their life, ~
the stock rom seems to run faster or something, there is less tearing (it seems to me atleast).
i love the aspect that linux is running on this device, you can run X11 or simething also in theory.
SNES emulation is a bit slow, whyever, but you can now play all other things on this device.
thank you so much for your help and warm words <3
i will upload a new linux image when i get the keypad working correctly
最近编辑记录 neotendo (2022-09-06 19:57:08)
离线
@neotendo
You can try latest port of the FBA: https://github.com/Rezzy-dev/fba-miyoo-playable/releases/tag/releaseIt fixes some stuff and you can open Menu with RESET button. For recompiling use Miyoo toolchain from steward's repo.
Thank you, i just downloaded your fba binary, works great
离线
Good afternoon, I have a question about the fc3000 v2 console, please help me find where this logo is located in the firmware and how to change it to my own? On xyc q8, I meggered with a hex editor or replaced with my own when creating u-boot. If this is possible on fc3000, then what address, through a hex editor or in which file in the firmware itself, is this logo located?
最近编辑记录 Aksenenkoav1990 (2022-09-07 22:37:20)
离线
@neotendo
Incredible DOOM!
Does that mean it is possible to run linux on FC3000 V2 IPS (WL-28H105-A1)?
离线
@Aksenenkoav1990
@Situ
I would also be interested.
离线
@Aksenenkoav1990
Basically, you can build uboot and kernel from scratch.
These logos have been removed from source code.
Source: https://github.com/steward-fu/fc3000
离线
@neotendo
Incredible DOOM!
Does that mean it is possible to run linux on FC3000 V2 IPS (WL-28H105-A1)?
it is currently running linux without X11 but with an SDL based menu.
there is Doom, Quake, Lot of Emulators, Audio/Video Player ....
but i need to fix some butons, when you press L1, SELECT key is pressed too, R1 is START also.
are you a user(Txuseol) from a spanish forum?
最近编辑记录 neotendo (2022-09-08 13:20:20)
离线
@Aksenenkoav1990
Basically, you can build uboot and kernel from scratch.
These logos have been removed from source code.
Source: https://github.com/steward-fu/fc3000
I tried to display a logo, but somehow it didn't work.
离线
run X11 ? it sounds very interesting !
Here is another project that use MT7688 processor: https://whycan.com/t_8714.html
I would like to run X11 (Debian OS) on that device.
So, it is worthy to study how to run X11 on framebuffer driver.
But in order to run X11, some kernel configurations need to be turned on, ex: network.
I think I can buy FC3000 IPS handheld again and try X11 on it.
@neotendo
I am curious about what kind of game/application needs X11 ? or why did you want X11 runs on FC3000 ?
离线
@司徒
i do not want X11, it is an option for someone who is able to code linux. this device is allready open now and is running linux, in theory X11 on framebuffer should be doable, but i do not need it.
PS: just got the keypad working correctly now.
only thing i could need is how to enable boot logo again, i tried many things, but no logo was shown during boot
离线
@neotendo
In framebuffer driver, I switched display layer from layer-0 to layer-1 as the following image shown:
Linux logo is always displayed on layer-0 when framebuffer driver is probed.
If you would like to show starting logo on LCD panel, here are the places you need to modify:
drivers/video/fbdev/sunivfb.c
954 mypar->app_virt->yoffset = 0;
1172 fb_prepare_logo(info, 0);
1173 fb_show_logo(info, 0);
P.S. You also need to turn Linux Logo on in kernel menu configuration.
离线
@司徒
Unfortunately it doesn't work, the screen only gets light up shortly before the menu.
nano suniv_defconfig -> CONFIG_LOGO=y, menuconfig enabled logo.
sunivfb.c
======
static void lcd_delay_init( XX )
...
//memcpy((uint8_t*)mypar->vram_virt + (320 * 240 * 2 * 1), hex_splash, 320 * 240 * 2);
//
// Enable Boot Logo
//
//mypar->app_virt->yoffset = 240; // Disable
mypar->app_virt->yoffset = 0; // Enable
...
static int myfb_probe( XXX )
....
//
// Boot Logo
//
fb_prepare_logo(info, 0);
fb_show_logo(info, 0);
setup_timer(&mytimer, lcd_delay_init, 0);
mod_timer(&mytimer, jiffies + HZ);
device_create_file(&device->dev, &dev_attr_variant);
return 0;
}
最近编辑记录 neotendo (2022-09-08 19:37:54)
离线
@neotendo
There is another way to show boot logo.
Just uncomment "memcpy" line and then provide "hex_splash" data.
Here is the example to demonstrate how to convert png/jpg into pixel array (hex_splash):
https://github.com/steward-fu/q8/releases/download/v1.1/png2hex.c
How to use:
$ gcc png2hex.c -o test -I/usr/include/SDL -lSDL -lSDL_image
$ ./test xxx.jpg > hex_splash.h
离线
@司徒
I will try it, but i think my backlight is off during this, seems like backlight is going on shortly before gmenu kicks in.
On the IPS FC3000 atleast.
离线
@Situ
yes, the boot logo is only displayed for a very short time when Gmenu starts, before that my background lighting is not on.
at which point in the source code is the backlight activated?
离线
@neotendo
Yes, in order to prevent flicking, which some LCD panels show white color when RESET is active, it is turned off in uboot and framebuffer initialization stages. So, you also need to set backlight level in device tree:
kernel/arch/arm/boot/dts/fc3000.dts
27 default-brightness-level = <0>;
离线
@司徒
no, sadly did not work either.
tft - screen flashes bright shortly, blackscreen/no backlight, logo flashes shortly before gmenu starts.
ips -screen flashes shortly but dimmed, blackscreen/no backlight, logo flashes shortly before gmenu starts.
i think there must be a (backlight on/off) command somewhere in the code.
ps: my logo seems a 24bit image, must create a 16bit.
最近编辑记录 neotendo (2022-09-09 20:35:51)
离线
@neotendo
Okay, thanks for your testing ~
I will check this issue when get my new FC3000, ~
hahahaha, really? ok, i will be waiting
can you compile png2hex.c and convert this test logo for me please?
i only have linux subsystem in window 10, and it does not allow me to use hardware such GraphicSystem (SDL not working)
i even do not know how to create a 16bit png file.
最近编辑记录 neotendo (2022-09-09 22:00:25)
离线
@neotendo
离线
@neotendo
Thank you
离线
@neotendo
^
your png2hex didn't work, it counts up, nothing more.
I saw this on my compiled png2hex test, it dumped a lot of ncurses garbage and some uint16 stuff in between, but all values just count up, just like your miyoo.h.
I don't have any developer toolchain or anything like that on Windows, only Freebasic, I use it to "script" something quickly, but my attempt with png2hex wasn't good enough, maybe because my PNG is 24-bit.
Cross Compile to windows in linux shell is pure hell.
*Bootlogo still shows only shortly before gmenu starts
最近编辑记录 neotendo (2022-09-10 01:53:38)
离线
@Situ
ok, i converted your png2hex program to FreeBASIC, but something went wrong, bugfixing time... again!
buggy source code and windows executeable
img2hex.7z
screenshot
最近编辑记录 neotendo (2022-09-10 03:21:08)
离线
even reload the header file into the sdl surface went wrong, what the heck?!#
离线
@neotendo
For splash issue, I will take a look later.
Thanks for your testing.
All right, i will still try it. Hope your FC3000 arrives fast 😄🤗.
I do not know this day, but happy midfall day
离线
@Situ
your png2hex tool is now working on windows. looks like the tool did not like my png file, i converted an bmp now correctly.
only thing is, win32 version outputs the data into stdout.txt
and your (*p)++ seems wrong, i changed it to *(p++)
changed your source code to win and linux version
最近编辑记录 neotendo (2022-09-11 20:42:54)
离线
Forget the png2hex thing, here is a better tool i got from @Aksenenkoav1990
only thing you need is to add things like "uint16_t hex_splash[]={" and "};" manually
最近编辑记录 neotendo (2022-09-13 12:41:13)
离线
@neotendo
Thanks for your efforts.
Is it possible to share the flash file (FC3000 IPS v2) for MicroSD to us ?
Since my new FC3000 will arrive soon, is it possible to provide the patch file for kernel source to me ?
Thanks in advance.
离线
@neotendo
Thanks for your efforts.
Is it possible to share the flash file (FC3000 IPS v2) for MicroSD to us ?Since my new FC3000 will arrive soon, is it possible to provide the patch file for kernel source to me ?
Thanks in advance.
Thank you. Of course i give you the image , its all based on your work.
I only do not know how to create patch files.
I can compress my kernel and uboot folder if you want.
I even got the bootlogo working now
最近编辑记录 neotendo (2022-09-13 17:45:26)
离线
@Situ
i saw in your kernel source code you already patched in the ips init code, do you have the old tft init code still
(your lcd init code in sunivfb.c matches the kernel_fc3000_ips.patch)?
user @Aksenenkoav1990 is using the fc3000_tft_od_jckl_no_roms.img.7z image.
and i wanted to compile a uboot with his bootlogo for him.
PS: it looks like the same code atleast. or do the two displays have almost the same init code?
最近编辑记录 neotendo (2022-09-13 18:36:44)
离线
@neotendo
Q1: i saw in your kernel source code you already patched in the ips init code, do you have the old tft init code still
(your lcd init code in sunivfb.c matches the kernel_fc3000_ips.patch)?
A1: It is for TFT LCD panel, not for IPS panel.
Patch file for IPS panel: https://github.com/steward-fu/fc3000/releases/download/source/kernel_fc3000ips.7z
You are welcome
Please zip kernel and uboot folders and then provide to me.
It is nice to see boot logo shown on FC3000 handheld.
Thanks for your efforts.
离线
@司徒
all right, i created all known variants.
./run.sh
...
echo "usage: run.sh /dev/sdX [pocketgo|trimui|fc3000]|[fc3000_ips1]|[fc3000_tft]|[fc3000_ips2]"
echo "fc3000_ips1 = RB411-11A -> V? IPS"
echo "fc3000_ips2 = WL-28H105-A1 -> V2 IPS"
echo "fc3000_tft = T2812-M106-24C-7D -> V1 TFT (old version)"
...
i did a ugly backlight patch, i added gpio_set_value( PE6, 1) in sunivfb.c
mykernel.tar.gz = your kernel source with my modifications
myuboot.tar.gz = your uboot (i think not modified but run.sh)
ready uboot image versions
=================
normal = your normal fc3000 option
ips1 = ips patch from your github (LCD: RB411-11A)
ips2 = my v2 ips (LCD: WL-28H105-A1)
tft = my v1 tft (old version) (LCD: T2812-M106-24C-7D)
to change bootlogo create a hex_splash.h file
with 16Bit RGB565 raw datas
uint16_t hex_splash[]={
};
i used lcd-image-converter or png2hex/img2hex
hopefully i did not ruined the source code and you can use it,
thank you very much for your linux, effort and help <3
premade uboot images
https://drive.google.com/file/d/1ife8acluRxljk0O5hSw9CjgOqrbOFkVy/view?usp=sharing
uboot source code
https://drive.google.com/file/d/1CvxLPG-WMmwAezmEHv3-6AyqPO8zeeJM/view?usp=sharing
kernel source code
https://drive.google.com/file/d/1VkSLqAICzeq3SNva4Wh_2iZTD1xzID8O/view?usp=sharing
bootlogo tools
https://drive.google.com/file/d/1Zs9owQ_c6c-6_f7Fjq1x2UwIy6k_oasA/view?usp=sharing
!!! KEEP IN MIND, MYKERNEL AND MYUBOOT EXTRACTS TO
KERNEL/ AND UBOOT/. DO NOT OVERWRITE YOUR FILES !!!
Reagrding bootlogo: i am right that the logo is schown when the kernel is loaded? is there a way to show the logo when uboot starts?
最近编辑记录 neotendo (2022-09-13 21:26:46)
离线
@neotendo
Thanks for your contributions.
I think it is time to host 2 repositories for the kernel and uboot source code even though I don't like to maintain all of them.
[Q1] i am right that the logo is schown when the kernel is loaded? is there a way to show the logo when uboot starts?
You can add the initial code (include GPIO reinitialization) at sunxi_lcdc_panel_enable() in uboot/drivers/video/sunxi/sunxi_display.c file.
This is the simplest way you can use.
离线
@司徒
thank you very much. i have no clue about repos and maintaining them.
maybe you can look over mykernel and myuboot and replace your kernel and uboot sources (backup your kernel/uboot of course)
oh, the battery symbol is not showing the current battery level, maybe that needs to fix.
just found eduke32 on your website, i compiled it but on fc3000 init is failed cause no mouse found and libmi_sys.so not found.
is there a chance to get duke3d running on fc3000?
最近编辑记录 neotendo (2022-09-14 21:39:11)
离线
@司徒
i have the backlight problem in uboot aswell, no light.
my ugly PE6,1 method did not work, ok, sad, but it is not soo important, would just a nice gimmick to display the logo earlier.
离线
@neotendo
[Q1] is there a chance to get duke3d running on fc3000?
[Q2] i have the backlight problem in uboot aswell, no light.
I will check these issues soon.My new FC3000 arrived ~
https://whycan.com/files/members/3145/1_20220916-1010.jpg
https://whycan.com/files/members/3145/2_20220916-1010.jpg
ahhh very cool, another CPU but a known LCD, uboot_ips2.img should work out of the box
离线
is there a chance to get duke3d running on fc3000?
After compiling, eduke32 works on MIYOO but you have to press repeadetly START (skipping intro?) to boot to main menu. After that you have to disable sfx sounds to enter game. Music works as expected in game, however sprites are all glitchy and if you enable back sounds it works only for a few seconds before sfx becomes corrupted.
离线
@Apaczer
No , my eduke32 is not starting into the intro. It is aborting with error message when i try to execute it.
最近编辑记录 neotendo (2022-09-17 18:04:33)
离线
Ok, found out that libmi_sys.so is for an sigmastar cpu or something, maybe a miyoo needed library.
离线
eduke32 is starting now...
created a duke3d.sh file
export SDL_MOUSEDEV="/dev/null"
export SDL_NOMOUSE="1"
eduke32
but now eduke is failing to init music/sound
最近编辑记录 neotendo (2022-09-17 19:49:28)
离线
ok guys, eduke32 is starting now...
- no music playing
- sound is distorted
- had to change in game.c var logoflags to (logoflags = LOGO_TITLESCREEN) in G_DisplayLogo() else eduke32 is exiting
- no mouse of course, was able to control duke with dpad
最近编辑记录 neotendo (2022-09-18 05:49:14)
离线
@Apaczer
Yes, nearly the same on fc3000.
I had to hardcode the source to enter main menu directly.
Enemies are disappearing.
Sound is corrupted.
Music is not playing.
离线
No idea about first two issues.
About the last one (music not playing), there has been lib sound (e.g. SDL_mixer) patches applied to rootfs in MiyooCFW comparingly to stock Miyoo source (see https://github.com/MiyooCFW/sdcard/blob/master/rootfs.tar.xz), so that's why its acting differently on your side.
eduke32 needs SDL_mixer to play the MIDI, which is using the native timidity config in /etc (https://github.com/Apaczer/eduke32/blob/9b03e526ab3ea8a7dcc3647631c37d6af4a09cb9/source/sdlmusic.c#L221)
You can also look here for more info: https://github.com/scooterpsu/midi-enabler
离线
@Apaczer
thank you very much, eduke32 has now music.
I copied over timidity.cfg, instruments/ and libSDL_mixer.so libs from miyoo rootfs and put it into the FC3000 rootfs.
todo...
- sound is very curupted (cracking and seems to play every sound file in the grp file)
- enemies deisappearing when duke looks at them or gets closer
离线
q20mini真的没救了吗大大,网上找了一圈都找不到包
离线
q20mini真的没救了吗大大,网上找了一圈都找不到包
离线
Anyone here familiar with the source code of eduke32?
I'm still having trouble with it.
The enemies or many sprites disappear into the ground, flicker or go through walls.
The sound also sounds broken, in a log I read something about "alsa pcm underrun".
I would appreciate information, thank you.
离线
@Situ
Is your FC3000 running linux now?
离线
@neotendo
Yes, it is running Linux OS with booting logo on my new FC3000 handheld now. I am creating 2 repos for bootloader and kernel source code. After complete, I will share it to you. For eduke32, as Apaczer mentioned, it is base on MIDI music format but it has some limitations on current rootfs because no any timidity configuration in system. Besides, eduke32 has another memory segmentation issue that happens on drawing animation. I think I will take a look at eduke32 soon.
Here are the ideas, maybe, we can use:
1. use WAV to replace MIDI
2. port SDL2 for eduke32
@卡卡cyj
你可以試試 lzgame02 提供的燒錄檔案~
@Apaczer @lzgame02
感謝分享~
离线
@司徒
Nice to hear that, thank you.
Eduke32 is running, i unpacked the FC3000 and MIYOO rootfs, copied over the libSDL_mixer.so , timidity.cfg and intruments to the FC3000 rootfs, repacked it and eduke32 has music now.
And i had to bypass the play_anim() routine to execute it, eduke32 cannot playabck the movie files.
最近编辑记录 neotendo (2022-09-23 02:55:15)
离线
Hi there,
here is my IPS V2 (WL-28h105-A1) Linux image.
- updated FBA
- added RetroArch
- added Duke3D Atomic Edition (but buggy as hell, sound and enemie issues)
- added Bootlogo
- Some little fixes
!! this time it has a new installation method in windows, watch my video !!
https://youtu.be/WzH5UnQ9kCs
https://mega.nz/file/mbQGHSBZ#MKj7x0QSqlqnXtuLDNwyUMAHtgTtl41zLdezMIIf5Io
FC3000 in action
https://youtu.be/BlkkFCp-XCE
最近编辑记录 neotendo (2022-09-23 22:43:04)
离线
@neotendo
!! Updated TFT V1 (T2812-M106-24C-7D) Version !!
L1/R1 are hard coded to A/B so I added an L1/R1 simulation.
Hold X and tap DPAD Left for L1.
Hold X and tap DPAD Right for R1.
This allows you to switch sections in the menu.
!! NEW INSTALLATION PROCEDURE !!
https://youtu.be/WzH5UnQ9kCs
Download link for "FC3000_TFT_V1_(T2812_M106_24C_7D).7z"
https://mega.nz/file/mHxxAT6S#WEbO1RbM4e7ef681znHvwWmPG03Hl-iPUxTPEa3vUZo
FC3000 in Action
https://youtu.be/h37twdx07OQ
最近编辑记录 neotendo (2022-09-24 06:18:21)
离线
Has anyone a clue why some emulators on linux are a bit slower than on the stock firmware.
离线
@situ
I added timidity and a timidity libSDL_mixer.so to rootfs and Eduke32 has now music , but still sound and enemies(most sprites) issues.
离线
@neotendo
Thanks for your sharing and contributions. we appreciate your help very much !
I have created 2 repos to host uboot and kernel source:
U-Boot: https://github.com/steward-fu/bootloader/tree/f1c100s_fc3000_uboot-2018.01
Kernel: https://github.com/steward-fu/kernel/tree/f1c100s_fc3000_linux-4.14.0
In U-Boot, you can use menuconfig to change your LCD panel
And run.sh has been renamed as tools/make_suniv.sh. For more detailed steps about how to build or flash into MicroSD, you can refer to the README page.
Here is the booting logo
And here is the kernel logo
As I remembered, you have asked something about the following desktop GUI
How to change it as the following desktop GUI
The answer is from theme setting
For classical GMenu2X, you can change it to Default. But it may use Default setting if unexpected rebooting.
And I think it is time to check eduke32 issues,
离线
@司徒
Thank you very much <3 for the kind words.
It's amazing how you changed the compilation process and added the uboot logo, very good work.
A lot of people are contacting me over youtube for the linux images, looks like we helped a lot of users.
I will try it tomorrow.
Thank you for your help, i am curious about eduke32
离线
@neotendo
For sound issue as the following logs, it isn't the key point caused eduke32 crash.
Initializing music...
Error: couldn't open any of the following files:
/etc/timidity/freepats.cfg
/etc/timidity/timidity.cfg
/etc/timidity.cfg
Although no any timidity.cfg found, it still works as well. Updating rootfs is an idea for this problem as you did. For more easy way to fix this warning, you can specify the timidity.cfg path as the following (in source/sdlmusic.c)
221 static char *s[] = { "/mnt/games/eduke32/timidity.cfg", "/etc/timidity.cfg", "/etc/timidity/timidity.cfg", "/etc/timidity/freepats.cfg" };
The main problem is at renderframe()
Thread 1 "eduke32" received signal SIGSEGV, Segmentation fault.
0xb6e25e68 in memset () from /lib//libc.so.0
(gdb) bt
#0 0xb6e25e68 in memset () from /lib//libc.so.0
#1 0x001e1e68 in decodeframe (
srcP=0xb4df2bc6 "((\v\v\026!\342Ƴ\001\263\263\263\001\263\001\361\241_,,\017`\032\032!\026(",
dstP=0x1d229bb <error: Cannot access memory at address 0x1d229bb>)
at source/jmact/animlib.c:180
#2 0x001e212c in renderframe (framenumber=0, pagepointer=0xb4df0b78)
at source/jmact/animlib.c:239
#3 0x001e2198 in drawframe (framenumber=0) at source/jmact/animlib.c:253
#4 0x001e2a98 in ANIM_DrawFrame (framenumber=1) at source/jmact/animlib.c:330
#5 0x000cf2d0 in G_PlayAnim (fn=0x26a658 "logo.anm", t=5 '\005')
at source/anim.c:261
#6 0x0006bccc in G_DisplayLogo () at source/game.c:8668
#7 0x0007055c in app_main (argc=1, argv=0xbeedbdf4) at source/game.c:9960
#8 0x00250f20 in main (argc=1, argv=0xbeedbdf4) at src/sdlayer.c:208
I need to trace it deeply to see whether resolution is the problem
And it seems the sound driver has problem when loading MIDI sound format
Initializing sound...
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
I also need to take a look at this problem
By the way, for the first time to run eduke32, you need to configure keyboard options as the following steps to make sure you can control it well
离线
@司徒
my eduke32 is running, i had to disable the playback of anm files, midi is playing fine with my rootfs, i added /etc/timidity.cfg, /etc/instruments, and used the libSDL_mixer.so from a miyoo rootfs.
Alsa gives me (snd_pcm_recover) underrun occurred warnings
Game plays fine but enemies are disappearing or glitching
Thanks for looking into that
离线
@neotendo
good you have your music working - soundtrack&voiceovers were the main reason why I loved this game!
@司徒
Could you advice us how to debug apps on this platform without UART? Do you have QEMU setup for ARM926EJ-S with "gdb" program as a help? I see you are pasting images from sort of windowed mode and though you might be using those.
I've tried to run my port with "gdb" through terminal app on Miyoo, but it didn't display anything (I think it might be due to SDL not liking drawing over another app).
离线
@司徒
do you have an FC3000 emulator? why does the duke nukem screenshots have a window?
离线
@司徒
1) - had to change command binman to binman.py in Makefile (make gives error 'binman.py not found'), and change #!/bin/sh to #!/bin/bash in make_suniv.sh(maybe only on my system cause i use a linux subsystem on windows).
2) - fc3000_ips1 - do not ask me why, but i had to change the lcd color order from BGR to RGB (the last 0x36 command in lcd init, change data 0x09 to 0x08), uboot bootlogo was kind of inverted colors.
3) - i narrowed down eduke32 segmentation fault at animation playing to the decodeframe procedure in animlib.c, bypassing this function allows eduke32 to start and plays the animation sound without animation of course.
4) - do not know if it happens a second time, but when i do 'make clean' in new uboot folder, i can not compile it again. mkimage not found.
but i will try it another time again, maybe i got something wrong.
<3
离线
@Apaczer
[Q1] Could you advice us how to debug apps on this platform without UART ?
[A1] No, you need to debug your app via UART because you need type command from UART.
[Q2] Do you have QEMU setup for ARM926EJ-S with "gdb" program as a help ? I see you are pasting images from sort of windowed mode and though you might be using those.
[A2] I wrote render tool to show image that obtained from /dev/fb0 node.
render tool: https://github.com/steward-fu/bootloader/blob/f1c100s_fc3000_uboot-2018.01/tools/show_320x240
How to use:
On FC3000:
# cat /dev/fb0 > xxx.raw
On PC:
$ show_320x240 xxx.raw
[Q3] I've tried to run my port with "gdb" through terminal app on Miyoo, but it didn't display anything.
[A3] You may need to redirect terminal output to framebuffer driver. So, you need enable "Framebuffer Console output" to show gdb result on your LCD panel. For more convenient way to debug your app without UART, you can try to port gdb client app on FC3000. Google is your friend !
@neotendo
[Q1] do you have an FC3000 emulator ?
[A1] No.
[Q2] why does the duke nukem screenshots have a window ?
[A2] Refer to reply above.
[Q3] had to change command binman to binman.py in Makefile (make gives error 'binman.py not found'), and change #!/bin/sh to #!/bin/bash in make_suniv.sh(maybe only on my system cause i use a linux subsystem on windows).
[A3] Fixed, thanks for reporting issue.
[Q4] fc3000_ips1 - do not ask me why, but i had to change the lcd color order from BGR to RGB (the last 0x36 command in lcd init, change data 0x09 to 0x08), uboot bootlogo was kind of inverted colors.
[A4] Did you mean tft v1 ? As the following lines shown, they need to be changed as 0x08 ?
U-Boot: https://github.com/steward-fu/bootloader/blob/f1c100s_fc3000_uboot-2018.01/drivers/video/fc3000_tft1.c#L205
Kernel: https://github.com/steward-fu/kernel/blob/f1c100s_fc3000_linux-4.14.0/drivers/video/fbdev/sunivfb.c#L1070
[Q5] i narrowed down eduke32 segmentation fault at animation playing to the decodeframe procedure in animlib.c, bypassing this function allows eduke32 to start and plays the animation sound without animation of course.
[A5] Thanks for your inforamtion. I will check it.
[Q6] do not know if it happens a second time, but when i do 'make clean' in new uboot folder, i can not compile it again. mkimage not found.
[A6] Fixed, thanks for reporting issue.
I think the sound issue is still in there even if update timidity.cfg and instruments because it seems SOUND option is disabled.
离线
@司徒
A4) yes the V1 one but only in uboot L204, kernel is ok
regarding duke, you can set sound to on, sound is playing but distorted and currupt. it sounds like sound engine is not stoping playback, or has problems with alsa.
timidity has nothing todo with the game sound.
here is my rootfs with working tmidity setup if you want
https://mega.nz/file/qKogBI5J#c8q3Leo4VioMvaECa_SBZvKscKSh2fjJZ3L8tj9aqdY
Video of my Eduke32 sound and enemies issues
https://youtu.be/qUdhwwFIhHs
最近编辑记录 neotendo (2022-09-25 23:27:37)
离线
It is very weird !!!
source/jmact/animlib.c
147 static void decodeframe(uint8_t * srcP, uint8_t * dstP)
...
172 count = B_LITTLE16(*((uint16_t *)((srcP += sizeof(int16_t)) - sizeof(int16_t))));
...
It can be formatted as the following code
count = B_LITTLE16(*(uint16_t *)srcP);
srcP += sizeof(int16_t);
It is just to get the content of memory at srcP and then put into count variable.
From GDB
count = B_LITTLE16(*((uint16_t *)((srcP += sizeof(int16_t)) - sizeof(int16_t))));
(gdb) p/x count
$2 = 0x9d80
(gdb) x/16x srcP-4
0xb4dc9b81: 0x8000 0xd99d 0x0000 0x2605 0x2d80 0x00c1 0x2605 0x2826
0xb4dc9b91: 0x280b 0x0600 0x0b0b 0x0b16 0x1a16 0x1a0b 0x0b1a 0x0b1a
srcP = 0xb4dc9b83
In general, it should be *(uint_16_t*)srcP = 0xd99d
But what we got is *(uint_16_t*)srcP = 0x9d80
GDB with instruction level
(gdb) stepi
0x001e1f08 <+304>: sub r3, r3, #2
=> 0x001e1f0c <+308>: ldrh r3, [r3]
0x001e1f10 <+312>: str r3, [r11, #-8]
0x001e1f14 <+316>: ldr r3, [r11, #-8]
(gdb) info r
r3 0xb4dc9b83 3034356611
(gdb) stepi
0x001e1f08 <+304>: sub r3, r3, #2
0x001e1f0c <+308>: ldrh r3, [r3]
=> 0x001e1f10 <+312>: str r3, [r11, #-8]
0x001e1f14 <+316>: ldr r3, [r11, #-8]
(gdb) info r
r3 0x9d80 40320
I'm getting crazy...
So, this is a workaround to fix this shit issue
172 //count = B_LITTLE16(*((uint16_t *)((srcP += sizeof(int16_t)) - sizeof(int16_t))));
173 count = B_LITTLE16(srcP[0] + (((uint16_t)srcP[1]) << 8));
174 srcP += sizeof(int16_t);
And now, animation works !
eduke32_fix.zip
Now, it is time to check MIDI issue...
离线
@司徒
very great new, you are amazing!!
we have no midi issue, look at my video above (after mod approved it)
离线
@neotendo
Okay, it is playable at least and sound quality is acceptable. If so, I think I will spend time on X11 porting.
Thanks for your help again !
X11?
does your gdb show something while the enemies are disappearing? maybe thats another kind of memory problem.
离线
@neotendo
Yes, I would like to see X Window running on FC3000. This is why I bought new FC3000 again. Accroding to the terminal log (it is most same as eduke32.log), I cannot find useful information. Maybe, I am not familiar with this game.
EDuke32 2.0.0devel 20100727
Using /mnt/games/eduke32/ for game data
Using /mnt/.eduke32/ for game data
Initializing SDL system interface (compiled against SDL version 1.2.15, found version 1.2.15)
Using "fbcon" video driver
No fullscreen modes available!
Searching for game data...
Using 'duke3d.grp' as main game data file.
Compiling: GAME.CON (151133 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45449 bytes)
GAME.CON: In state `blimphitstate':
GAME.CON:476: warning: expected action, found define.
GAME.CON: In actor `ORGANTIC':
GAME.CON:3969: warning: found `else' with no `if'.
GAME.CON: In state `pigshootenemystate':
GAME.CON:5892: warning: found `else' with no `if'.
Found 3 warning(s), 0 error(s).
Resizing code buffer to 16189*4 bytes
Script compiled in 948ms, 16181*4b, version 1.4+
1917/11264 labels, 321/2048 variables
125 quotes, 207 actors
Initialized 24.0M cache
RTS file DUKE.RTS was not found
Initializing OSD...
0 joystick(s) found
Setting video mode 1024x768 (16-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Attempting safer mode...
Setting video mode 1024x768 (16-bpp windowed)
Unable to set video mode!
Failure setting video mode 1024x768x8 windowed! Attempting safer mode...
Setting video mode 800x600 (16-bpp windowed)
Unable to set video mode!
Failure setting video mode 800x600x8 windowed! Attempting safer mode...
Setting video mode 640x480 (16-bpp windowed)
Unable to set video mode!
Failure setting video mode 640x480x8 windowed! Attempting safer mode...
Setting video mode 320x240 (16-bpp windowed)
Initializing music...
Error: couldn't open any of the following files:
/etc/timidity/freepats.cfg
/etc/timidity/timidity.cfg
/etc/timidity.cfg
Error: couldn't open any of the following files:
/etc/timidity/freepats.cfg
/etc/timidity/timidity.cfg
/etc/timidity.cfg
S_MusicStartup(): failed initializing
Initializing sound...
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8323:(snd_pcm_recover) underrun occurred
It is recommended to do CPU overclock for this issue. In general, "underrun occurred" means the running speed is very slow (CPU is very busy) so that sound buffer cannot be handled properly. To do overclock can fix this issue.
离线
Fix battery issue: https://github.com/steward-fu/kernel/commit/3dc11057d85302f41b8b23627fb247dadd7e4520
But I don't know how to calibrate it so far.
离线
Fix battery issue: https://github.com/steward-fu/kernel/commit/3dc11057d85302f41b8b23627fb247dadd7e4520
https://whycan.com/files/members/3145/1_20220926-1919.jpg
But I don't know how to calibrate it so far.
Great, i'll take a look, maybe i can find how to calibrate
离线
@neotendo @司徒
The battery range levels are hardcoded in latest gmenunx code, for current src you can adhere to miyoo_beta branch on my repo (specifically: https://github.com/Apaczer/gmenu2x/blob/miyoo_beta/src/platform/bittboy.h#L107). I've rewrote parts of deprecated miyoo code and brought new features from master branch.
For other types of batteries than BL-5C you might want to do battery log and check those values.
P.S. If you use GameShow skin or similar, then check NOTES in release tab.
最近编辑记录 Apaczer (2022-09-27 05:27:45)
离线
@Apaczer
Thanks for your information. It seems your repo has fixed CPU overclock issue (or 0x80000000) already. After tested, it cannot work properly. It hangs after using different CPU clock (not 702MHz). You can test with different CPU clock value for this issue. Here is the reference for you: https://whycan.com/t_6647.html#p66051
离线
@司徒
I've performed tests on another device which normally overclocks to 864MHz (for 1.2V). It is necessary to reset CPU setting of old app links in gmenunx (or create new ones) to make new CPU registers acceptable by system.
Although I do not own FC3000, I don't see a reason why it should behave differently (there have been test on other consoles). Didn't you mention at first that it can't work beyond 602MHz without new resistors?
离线
这个还是F1C100s主控, 能力不够啊
离线
Does it mean i can overclock the fc3000 now?
Everytime system hangs while starting an app when i set cpu over 702mhz.
Or is a resistor change mandatory?
离线
@neotendo
Yes, you can do overclock on your FC3000 handheld under GMenu2X setting. If you need high CPU speed, ex: 900MHz, you need to do hardware modding. If not, I think 702MHz is the best choice.
But i need to update gmenu2x right?
I tried deleting gmenu2x.conf too, but everytime when i set clock speed above 702mhz, fc3000 hangs.
最近编辑记录 neotendo (2022-09-28 22:30:55)
离线
@neotendo
The maximum CPU clock we can use on the FC3000 without hardware modding is around 702MHz. So, you cannot set the CPU clock that exceeds 702MHz.
Ahh, ok, get it. So if i want above 702 i must change the resistors like on the first pages, ok
离线
QEMU for FC3000 handheld
I spent some time on porting QEMU for FC3000 handheld. It is very useful for software development on QEMU environment because you can debug your application more easily. It is just a software level compatible, not hardware level, for example: you cannot access F1C100s registers in your application. This port is based on QEMU versatilepb (ARM926EJS) CPU and run FC3000's rootfs. So, you can test your app on this environment and then put it into your FC3000 after pass testing on QEMU environment.
Kernel Source: https://github.com/steward-fu/kernel/tree/f1c100s_fc3000_linux-4.14.0_qemu
Prebuilt QEMU: https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000-qemu_20220929.7z
QEMU for FC3000 handheld
You can type command via your terminal.
If you want to debug your app, add "sleep" in "/etc/main" and then repack rootfs.img
Remember to export SDL variables and then run gdb (I have put into rootfs.img already)
You can also put source code into sd.img for debugging
How to run QEMU for FC3000 handheld
$ cd
$ wget https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000-qemu_20220929.7z
$ 7za x fc3000-qemu_20220929.7z
$ ./run.sh
How to extract rootfs.img
$ zcat rootfs.img | cpio -idvm
How to repack rootfs.img
$ sudo find . | sudo cpio -o -H newc | gzip -9 > ../rootfs.img
离线
@Situ
Just amazing, i will download your new source codes with patched battery and try qemu. Very great work
离线
@Situ
duke has no sound problems in qemu, still has underruns but sound is not currupt as on the FC3000 hardware, enemies do not disappear in qemu also.
whats the difference between FC3000 HW and QEMU?
eduke32 is running without issues on QEMU!
最近编辑记录 neotendo (2022-09-29 17:29:46)
离线
@neotendo
For eduke32 problem, it seems related to performance issue because we use same binary ELF. If possible, you can do hardware modding and then overclock CPU speed upto 900MHz to check whether it can fix or not. If it is related to display driver, it should be flicking rather than disappearing. So, I guess this issue is related to performance.
离线
@司徒
The enemies do in fact flicker sometimes, it is a mix of disappearing, flickering and going trough walls
离线
@Situ
i try to change sounds from .grp file to wav/voc/ogg maybe that helps.
I play the same version on qemu and fc3000, on qemu eduke works fine but on fc3000 the enemies seems to fall trough the floor. (i saw 2 enemies in water but they had to be on the ground above).
enemies sometimes flicker or disappearing, very strange.
do you have any clue? i do not!
最近编辑记录 neotendo (2022-09-30 00:15:26)
离线
I spent some time on porting QEMU for FC3000 handheld
Remarkable! This was requsted dozens times on other forums! Everything works as expected, I even tried custom RetroArch build on it with no problem. Will be very helpful for simple debugging, especially as I'm currently without real console hah!
I think if you want simply read log from gdb you can do it in handheld while writing to a file thus using sole framebuffer, e.g. through /etc/main :
/mnt/gdb -ex=run -ex="bt full" -ex=q ./program > debug.txt
离线
@neotendo
Try to "OR" SDL_DOUBLEBUF when call SDL_SetVideoMode() function.
SDL_SetVideoMode(1, 1, 8, SDL_NOFRAME | SURFACE_FLAGS | ((fs&1)?SDL_FULLSCREEN:0) | SDL_DOUBLEBUF);
P.S. Update all of SDL_SetVideoMode() functions.
@Apaczer
Thanks for your information.
离线
@kendling IPS屏的代码给我一下
离线
@Apaczer
I have retroarch already running on FC3000.
Just downloaded the miyoo version from retroarch website.
离线
@neotendo
Try to "OR" SDL_DOUBLEBUF when call SDL_SetVideoMode() function.SDL_SetVideoMode(1, 1, 8, SDL_NOFRAME | SURFACE_FLAGS | ((fs&1)?SDL_FULLSCREEN:0) | SDL_DOUBLEBUF);
P.S. Update all of SDL_SetVideoMode() functions.
@Apaczer
Thanks for your information.
Thank's i will try that
离线
@neotendo @Apaczer
Wow ! It is official support ~ Thanks for this information !
stable: https://buildbot.libretro.com/stable/1.10.3/dingux/miyoo-arm32/
nightly: https://buildbot.libretro.com/nightly/dingux/miyoo-arm32/
Run RetroArch on FC3000
离线
@neotendo
Try to "OR" SDL_DOUBLEBUF when call SDL_SetVideoMode() function.SDL_SetVideoMode(1, 1, 8, SDL_NOFRAME | SURFACE_FLAGS | ((fs&1)?SDL_FULLSCREEN:0) | SDL_DOUBLEBUF);
P.S. Update all of SDL_SetVideoMode() functions.
@Apaczer
Thanks for your information.
Too sad, it was not the solution. That's so strange and makes me angry.
Still glitching and disappearing
https://youtu.be/m1EGq6mR0QM
最近编辑记录 neotendo (2022-09-30 20:25:30)
离线
Support dual boot function on FC3000 handheld
U-Boot source: https://github.com/steward-fu/bootloader/commit/e02c2adfa3eacbe93338df28d7b93c3bbb5f93d9
By default, it boots into Linux OS.
If press SELECT button and then power on, it boots into stock system.
I miss dingux system on Dingoo A320.
离线
@neotendo
Please provide the save state to me.
sorry, what do you mean exactly with savestate?
离线
@司徒
very handy, but you must change the sdcard anyway or use a bigger one and put the needed files on the card (V1/V2 Stock files).
but cool solution.
离线
@neotendo
Yes, you need put needed files in MicroSD for stock system but it is more handy to switch system without removing MicroSD.You can save state by using "save game" option and then provide the saved state to me.
https://whycan.com/files/members/3145/1_20220930-2229.jpg
i saved it, but preview picture is currupt, can not load back the save game, errors or savegame currupt in log file.
regarding sound issues:
i created a EDUKE.CON file with
"definesound ID FILE 0 0 0 0 0"
entrys from ID 0 to ID 2500.
every sound was replaced with a dummy wav file(a door close sound), no more currupt sounds, confused!
SAVEGAME + LOG
egam0.7z
eduke32.log.txt
MY EDUKE.CON + WAV FILE
EDUKE.CON.txt
NULL.7z
最近编辑记录 neotendo (2022-09-30 23:05:49)
离线
something went realy wrong on FC3000 hardware.
Savegame from eduke32 FC3000 Hardware on QEMU(looks same on FC3000)
离线
@Situ
I solved the sound problem!
The FC3000 hardware doesn't seem to like the original VOC sound files.
I have now extracted all VOC files from duke3d.grp, converted them to WAV, renamed it to VOC and put it back into duke3d.grp.
no currupted sounds anymore!
最近编辑记录 neotendo (2022-10-01 03:14:20)
离线
Wow ! It is official support ~ Thanks for this information !
stable: https://buildbot.libretro.com/stable/1.10.3/dingux/miyoo-arm32/
nightly: https://buildbot.libretro.com/nightly/dingux/miyoo-arm32/Run RetroArch on FC3000
@neotendo, @司徒
Thank you, It's accumulated work of MiyooCFW & RetroArch community, we try add new things every release (today is new one!). You can search "MIYOO" in changelog for full info. I've been lately occupied with new video filter for 320x240 screens, but it needs testing.
You can find usefull info for setting up RA for Miyoo in here: https://github.com/TriForceX/MiyooCFW/wiki/RetroArch-Setup
Big credits go to salvacam & jSTE0 - they did most of work in maintaining frontend and porting cores!.
BTW - if you want to test your own builds/cores or see smth changed just do "make -f Makefile.miyoo" after modding.
离线
@Apaczer
I do not think that the FC3000 is powerfull enough for video filters, atleast without overclocking.
But we have now a fully emulation beast.
We can run linux, linux based emulators, retroarch and now the stock system, all with one big sd card.
I updated gmenu2x, fba
Added retroarch and eduke32(still buggy)
I will try to update some other emulators
Flashed the current kernel and uboot.
@Situ
My baterry icon still has no function. It is only changed from a dead icon(in older kernel/gmenu2x) to a cable(charge) icon.
离线
@Situ
i tried your dual boot feature. we have the problem now, stock firmware search roms on the first partition (FC3000) where the rootfs is.
this partition has not enough space and our other roms are on the second partition (OD).
only solution that came in mind is to put all files in first partition and mount that as /mnt, so we have /roms folder in stock firmware and /mnt/roms in linux firmware.
or link the folders if possible, idk.
最近编辑记录 neotendo (2022-10-01 20:33:52)
离线
@neotendo
User need to resize the first partition in order to put all of needed files. For battery issue, we needs to take a look at GMenu2X to see what kind of value read from kernel driver. For eduke32, it seems this issue is related to chip issue rather than performance issue because the enemy's position is wrong when render sprite. Since eduke32's source code is very complicated, I think it is not easy to find root cause out in a short time. For RetroArch, it is worthy to run RetroArch on miyoo handheld even if the performance is not good. We need focus on software optimization rather than high performance chip, which this is what we need eventually. Also, we need to thanks all of contributors for open source ported on miyoo handheld.
离线
@司徒
I didn't say anything against retroarch, just that the video filters weren't that good for this hardware.
yes that's right, the eduke32 code is hard to understand.
even voxel based enemies are glitching, damn.
*user needs to resize...
but then you would have to have the roms twice on the sd card.
I'm trying to make the whole system on one partition, was able to mount /dev/mmcblk0p1 as rw and mounted partition 1 on /romdir.
have created /roms/sfc on partition 1, can access it with stock and linux.
in theory all contents from partition 2 can copy over to partition 1 and mounted on /mnt instead /romdir.
I also wrote a script which tests the fat partition for dirty bits and then runs fsck.vfat if the system was simply switched off (because of partition 1 rw mode).
updated snes9x4D and pocketSNES also.
最近编辑记录 neotendo (2022-10-02 01:55:45)
离线
@Situ
new system done!!
Created 2 partitions with minitool partition wizard, one 32MB and one with the rest of sdcard (win10 did not allow create fat32 partitions bigger than 32GB).
Deleted the first 32MB partition (32MB unalocated, 57GB Fat32).
dd uboot+kernel into the unallocated 32MB partition.
copied over my modded linux systemfiles to the big Fat32 partition, now the stock firmware and linux can access the /roms folder.
But looks like that the Stock NeoGeo emu accepts WST roms only.
- updated gngeo
EDUKE32
i think the error lies in drawsprite() function in engine.c, but i have not such a fast eye for buggy source code as you .
最近编辑记录 neotendo (2022-10-02 05:33:36)
离线
@neotendo
Thanks for your efforts.
Could you share this image to us ? I would like to try it on my FC3000.
I have no image, but i will 7z the modified rootfs and other needed files later.
离线
When the monster is walking towards the player, the value of X position should be in order of increasing.
XYZ mapping
According to the raw data got from QEMU and FC3000, the results show that it is correct in QEMU environment but incorrect in FC3000.
Raw Data
FUNCTION X_QEMU Y_QEMU X_F1 Y_F1
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 384 44608 384 44608
G_MoveActors 462 44584 384 44608
G_MoveActors 462 44584 384 44608
G_MoveActors 462 44584 384 44608
G_MoveActors 462 44584 384 44608
G_MoveActors 574 44549 384 44608
G_MoveActors 574 44549 384 44608
G_MoveActors 574 44549 384 44608
G_MoveActors 574 44549 384 44608
G_MoveActors 698 44511 384 44608
G_MoveActors 698 44511 384 44608
G_MoveActors 698 44511 384 44608
G_MoveActors 698 44511 384 44608
G_MoveActors 828 44471 384 44608
G_MoveActors 828 44471 384 44608
G_MoveActors 828 44471 384 44608
G_MoveActors 828 44471 384 44608
G_MoveActors 958 44432 462 44584
G_MoveActors 958 44432 462 44584
G_MoveActors 958 44432 462 44584
G_MoveActors 958 44432 462 44584
G_MoveActors 1088 44393 574 44549
G_MoveActors 1088 44393 574 44549
G_MoveActors 1088 44393 574 44549
G_MoveActors 1088 44393 574 44549
G_MoveActors 1218 44354 698 44511
G_MoveActors 1218 44354 698 44511
G_MoveActors 1218 44354 698 44511
G_MoveActors 1218 44354 698 44511
G_MoveActors 1353 44368 828 44471
G_MoveActors 1353 44368 828 44471
G_MoveActors 1412 44400 828 44471
G_MoveActors 1412 44400 828 44471
G_MoveActors 1471 44432 826 44335
G_MoveActors 1471 44432 826 44335
G_MoveActors 1530 44464 826 44335
G_MoveActors 1530 44464 826 44335
G_MoveActors 1589 44496 824 44199
G_MoveActors 1589 44496 824 44199
G_MoveActors 1648 44528 824 44199
G_MoveActors 1648 44528 824 44199
G_MoveActors 1707 44560 822 44063
G_MoveActors 1707 44560 822 44063
G_MoveActors 1766 44592 822 44063
G_MoveActors 1766 44592 822 44063
G_MoveActors 1885 44657 768 43938
G_MoveActors 1885 44657 768 43938
G_MoveActors 1885 44657 768 43938
G_MoveActors 1885 44657 768 43938
G_MoveActors 2012 44610 670 43843
G_MoveActors 2012 44610 670 43843
G_MoveActors 2075 44586 670 43843
G_MoveActors 2075 44586 670 43843
G_MoveActors 2202 44539 572 43748
G_MoveActors 2202 44539 572 43748
G_MoveActors 2202 44539 572 43748
G_MoveActors 2202 44539 572 43748
G_MoveActors 2329 44492 474 43653
G_MoveActors 2329 44492 474 43653
G_MoveActors 2329 44492 474 43653
G_MoveActors 2329 44492 474 43653
G_MoveActors 2429 44400 376 43558
G_MoveActors 2429 44400 376 43558
G_MoveActors 2429 44400 376 43558
G_MoveActors 2429 44400 376 43558
G_MoveActors 2429 44400 245 43430
G_MoveActors 2429 44400 245 43430
G_MoveActors 2506 44235 245 43430
G_MoveActors 2506 44235 245 43430
G_MoveActors 2506 44235 101 43290
G_MoveActors 2506 44235 101 43290
G_MoveActors 2590 44053 101 43290
G_MoveActors 2590 44053 101 43290
G_MoveActors 2590 44053 -48 43144
G_MoveActors 2590 44053 -48 43144
G_MoveActors 2678 43864 -48 43144
G_MoveActors 2678 43864 -48 43144
G_MoveActors 2678 43864 -197 42998
G_MoveActors 2678 43864 -197 42998
G_MoveActors 2766 43675 -197 42998
G_MoveActors 2766 43675 -197 42998
G_MoveActors 2766 43675 -197 42790
G_MoveActors 2766 43675 -197 42790
G_MoveActors 2967 43622 -197 42790
G_MoveActors 2967 43622 -197 42790
G_MoveActors 2967 43622 -197 42582
G_MoveActors 2967 43622 -197 42582
G_MoveActors 3168 43569 -197 42582
G_MoveActors 3168 43569 -197 42582
G_MoveActors 3168 43569 -197 42374
G_MoveActors 3168 43569 -197 42374
G_MoveActors 3369 43516 -197 42374
G_MoveActors 3369 43516 -197 42374
G_MoveActors 3369 43516 -117 42182
G_MoveActors 3369 43516 -117 42182
G_MoveActors 3575 43544 -117 42182
G_MoveActors 3575 43544 -117 42182
G_MoveActors 3575 43544 -117 41974
G_MoveActors 3575 43544 -117 41974
G_MoveActors 3754 43649 -117 41974
G_MoveActors 3754 43649 -117 41974
G_MoveActors 3754 43649 -117 41766
G_MoveActors 3754 43649 -117 41766
G_MoveActors 3933 43754 -117 41766
G_MoveActors 3933 43754 -117 41766
G_MoveActors 3933 43754 -117 41558
G_MoveActors 3933 43754 -117 41558
G_MoveActors 4112 43859 -117 41558
G_MoveActors 4112 43859 -117 41558
G_MoveActors 4112 43859 -117 41350
G_MoveActors 4112 43859 -117 41350
G_MoveActors 4291 43964 -117 41350
G_MoveActors 4291 43964 -117 41350
G_MoveActors 4291 43964 -117 41142
G_MoveActors 4291 43964 -117 41142
G_MoveActors 4470 44069 -117 41142
G_MoveActors 4470 44069 -117 41142
G_MoveActors 4470 44069 -117 40934
G_MoveActors 4470 44069 -117 40934
G_MoveActors 4649 44174 -117 40934
G_MoveActors 4649 44174 -117 40934
G_MoveActors 4649 44174 -117 40726
G_MoveActors 4649 44174 -117 40726
G_MoveActors 4828 44279 -117 40726
G_MoveActors 4828 44279 -117 40726
G_MoveActors 4828 44279 -117 40726
G_MoveActors 4828 44279 -157 40629
G_MoveActors 5012 44183 -157 40629
G_MoveActors 5012 44183 -157 40629
G_MoveActors 5012 44183 -157 40629
G_MoveActors 5012 44183 -197 40532
G_MoveActors 5196 44087 -197 40532
G_MoveActors 5196 44087 -197 40532
G_MoveActors 5196 44087 -197 40532
G_MoveActors 5196 44087 -237 40435
G_MoveActors 5380 43991 -237 40435
G_MoveActors 5380 43991 -237 40435
G_MoveActors 5380 43991 -237 40435
G_MoveActors 5380 43991 -277 40338
G_MoveActors 5587 43973 -277 40338
G_MoveActors 5587 43973 -277 40338
G_MoveActors 5587 43973 -277 40338
G_MoveActors 5587 43973 -277 40234
G_MoveActors 5785 44035 -277 40234
G_MoveActors 5785 44035 -277 40234
G_MoveActors 5785 44035 -277 40234
G_MoveActors 5785 44035 -277 40130
G_MoveActors 5983 44097 -277 40130
G_MoveActors 5983 44097 -277 40130
G_MoveActors 5983 44097 -277 40130
G_MoveActors 5983 44097 -277 40026
G_MoveActors 5983 44097 -277 40026
G_MoveActors 6181 44159 -277 40026
G_MoveActors 6181 44159 -277 40026
G_MoveActors 6181 44159 -316 39929
G_MoveActors 6181 44159 -316 39929
It seems there is a potential bug in F1C100S, which seems like we found before (LDRH instruction in odd address). I cannot make sure whether we can find root cause or not but it is very interesting for this issue. Here is the current finding for reference.
离线
@司徒
you are soooo amazing man!!!! so it seems a math error on fc3000 hardware. i will take a look into G_MoveActors().
but I think that not only X is the problem, I think Y and Z are also affected.
PS: bypassing A_GetZLimits(int32_t iActor) in source/gameexec.c keeps the enemies on screen. they still have some bugs but did not disappear or flicker (i can fight against them).
finaly some results!!!!
thank you so much for your info <3
PPS: looks like the issue lies in getzrange() in build/src/engine.c, bypassing getzrange() in A_GetZLimits() has the same effekt as bypassing A_GetZLimits() complete.
最近编辑记录 neotendo (2022-10-04 09:26:31)
离线
@Situ
I will try to upload the linux files today
离线
@neotendo
Thanks for your efforts to share this image to us !
Here are the backtrace logs
// #define ZOFFSET (1 << 8)
// vm.g_sp->z = actor[vm.g_i].floorz - ZOFFSET; <= at source/gameexec.c:1160
(gdb) p vm.g_i
$13 = 448
(gdb) p vm.g_sp->z
$2 = -8448
(gdb) p actor[vm.g_i].floorz
$3 = -469696513
(gdb) n
1162 in source/gameexec.c
(gdb) p vm.g_sp->z
$4 = -469696769
#0 VM_Execute (once=0) at source/gameexec.c:1160
#0 VM_Execute (once=0) at source/gameexec.c:1402
#0 VM_Execute (once=0) at source/gameexec.c:1402
#0 VM_Execute (once=0) at source/gameexec.c:695
#0 A_Execute (iActor=448, iPlayer=0, lDist=12586) at source/gameexec.c:4930
#0 G_MoveActors () at source/actors.c:4774
(gdb) p sprite[448]
$1 = {x = 384, y = 44608, z = -8448, cstat = 257, picnum = 1680,
shade = 4 '\004', pal = 22 '\026', clipdist = 80 'P', filler = 0 '\000',
xrepeat = 40 '(', yrepeat = 40 '(', xoffset = 0 '\000', yoffset = 0 '\000',
sectnum = 258, statnum = 1, ang = 1920, owner = 448, xvel = 0, yvel = 0,
zvel = 0, lotag = 0, hitag = 0, extra = 30}
#0 G_MoveActors () at source/actors.c:3415 <= trace from here (i == 448)
#0 G_MoveWorld () at source/actors.c:7901
#0 G_DoMoveThings () at source/game.c:10447
#0 G_MoveLoop () at source/game.c:10312
#0 app_main (argc=1, argv=0x7fffffffe128) at source/game.c:10229
#0 main (argc=1, argv=0x7fffffffe128) at src/sdlayer.c:235
I don't know when the variable "actor[vm.g_i].floorz" is set as 0xe400ffff (-469696513). So, after subtract, the value of Z position becomes as invalid (-469696769). As you mentioned before, besides Z, XY are also affected. This issue doesn't happen on QEMU and x64 PC environments but on FC3000 handheld. Interesting
Here is the table for reference
According to the testing, Z position is affected firstly and then X postion.
离线
@司徒
man, you are so skilled.
really strange how this CPU seems to not had math lessons in the elementary school, hahahha.
here is the "image" (!! FOR TESTING PURPOSE ONLY, NO FINAL IMAGE GUYS !!)
https://drive.google.com/file/d/1eEUu4_tPvH7hVs_U-Gwim441el1uvHnv/view?usp=sharing
1. Create Partition 1 with 32MB in size (FS is not important)
2. Create Partition 2 with the rest of your sdcard (fat32)
(Windows does not allow bigger partitions than 32GB, only with third party tools like minitool partition wizard)
3. Save Partition table to disk
4. Delete Partition 1 so it is unallocated, save Partition table to disk
5. DD your current/dualboot uboot.img to Partition 1
6. Extract archive to the Fat32 Partition
7. i added a fsck.vfat script when dirty bit is set (unclean shutdown), so it can take some time
to boot if dirty bit is set.
i do not know how important it is on an fat32 fs, but i added it because my solution is
to remount /boot as RW and mount /boot on /mnt in inittab.
maybe you can make it better (script is in /etc/vfatfsck.sh and is called in /etc/main).
- updated gmenu2x (press menu button for poweroff option)
- added reboot link in settings section
最近编辑记录 neotendo (2022-10-05 06:52:33)
离线
@Situ
looks like some datatypes are not compatible with f1c100s.
i can not load save game nor demos (demos are based on savegames/snapshots), it gives me error when loading savegame or a demo.
demo recorded in QEMU, FC3000 says wrong demo version, bypassing version check, same error as when loading savegame, eduke32 crashing, Demo and Savegames are ok in QEMU.
so i assume it is the same thing with the X,Y,Z issue (datatypes).
very confusing
eduke32.log before bypassing demo version
===========================
Incompatible demo version. Expected 0.2.196, found 0.2.50180
There were errors opening demo 1(code: 2).
eduke32.log after bypass version check
========================
sv_loadsnapshot: size: 8106826 bytes.
ud: 343
sws: 3590660
script: 2103296
animisc: 2397343
ERROR: NULL weapon! WTF?!
Wrote eduke32.cfg
Wrote settings.cfg
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
hash_find(): table not initialized!
ERROR: NULL weapon! WTF?!
Wrote eduke32.cfg
Wrote settings.cfg
just wanted let you know that.
最近编辑记录 neotendo (2022-10-05 06:48:36)
离线
ok, just fixed eduke32....
compiled eduke32_20131102-4128 successfully and it is working without disappearing/flicker issues.
still savegame and demo not working. and playanim() function need to be fixed again.
decodeframe() function patched, animations playing back again.
maybe i will try to compile higher versions.
最近编辑记录 neotendo (2022-10-06 00:03:36)
离线
給大家一點小小的幫助,FBA0.2.96.86的完整全套rom,共1379個rom。
A little help, the complete set of FBA 0.2.96.86, a total of 1379 roms.
链接:https://pan.baidu.com/s/1MbySGZ8CzSAYfKtTFcrJHg?pwd=gggg
提取码:gggg
https://drive.google.com/drive/folders/17VYuMTCWv7RpX3pcxKqRSbfWl5-Fzw5O?usp=sharing
最近编辑记录 ZOMBIE (2022-10-06 05:16:57)
离线
給大家一點小小的幫助,FBA0.2.96.86的完整全套rom,共1379個rom。
A little help, the complete set of FBA 0.2.96.86, a total of 1379 roms.
链接:https://pan.baidu.com/s/1MbySGZ8CzSAYfKtTFcrJHg?pwd=gggg
提取码:gggg
cool, thank you, but i can't download it. website is not loading, maybe too far away from germany!?
can you upload to mega.nz or gdrive?
最近编辑记录 neotendo (2022-10-05 22:55:14)
离线
@neotendo
I've tried uploading Google Drive, see if you can download it, if not I'll try another cloud drive.
https://drive.google.com/drive/folders/17VYuMTCWv7RpX3pcxKqRSbfWl5-Fzw5O?usp=sharing
离线
@neotendo
I've tried uploading Google Drive, see if you can download it, if not I'll try another cloud drive.
https://drive.google.com/drive/folders/17VYuMTCWv7RpX3pcxKqRSbfWl5-Fzw5O?usp=sharing
thank you, it is compressing an eternity and downloads 3 x 2GB archive files.
最近编辑记录 neotendo (2022-10-06 09:36:13)
离线
@Situ
have you already tried my linux files for dual boot?
here is the new eduke32 executeable
eduke32.7z
最近编辑记录 neotendo (2022-10-06 09:37:52)
离线
@ZOMBIE
感謝分享~
@neotendo
Yes, I repacked the files you provided as fc3000_ips2_dualboot.img.7z, which also include stock games.
fc3000_ips2_dualboot.img.7z: https://drive.google.com/file/d/1O_4df4wM6qx2zPaP7eXzVJiqDsXbPa9T/view?usp=sharing
May I know where I can download the source code of eduke32_20131102-4128 ? By the way, after tried the eduke32.7z you provided on FC3000, it seems all of issues got fixed except for SaveGame and LoadGame ?
离线
@司徒
Why making an image?
My purpose was that we do not need an image anymore.
So the enduser did not have to resize partitons.
ok, after rethinking about it, i believe writing an image to sdcard and resize it is easier for an end-user.
maybe we can make a little tool for that? anyway, good job Stewen.
i got eduke32 source code from the official website i think.
would be great if we can compile higher versions.
you need todo some work to compile that code (Makefiles, Code editing etc).
https://dukeworld.duke4.net/eduke32/synthesis/old/2013/20131102-4128/
PS: i added more gore/guts and xxx patch (complete naked girls)
nude patched grp file
duke3d_20221006-1817.7z
more guts/gore GAME.CON (put file in dir where eduke32 executeable is)
GAME_CON.7z
最近编辑记录 neotendo (2022-10-06 18:21:14)
离线
@司徒
yes, all seemed to work now, only savegame/loadgame and demo loading/saving did not work.
demo is based on savegame/loadgame so i think if you got fixed save/load-game demo playback should work too then.
PS: you do not need the wst file in root of your image file
最近编辑记录 neotendo (2022-10-06 18:58:54)
离线
@Situ
what do you think about my solution with dualboot?
remount /boot as RW and mount it as /mnt, and the fsck if dirty bit is set script?
离线
@neotendo
Yes, user prefer flashing image over unzipping these files. I will not create any tool for this purpose because it is a little more complex and depends on many binary files we need upload upto another repo. So far, it seems eduke32 is running pretty well on FC3000 after build with new source code. I think it is time to study something I am interested on. If you have any question and would like to discuss with us, it is very welome. And thanks for your contributions on FC3000 !
离线
@司徒
yeah, duke is runing good now, finaly.
thank you very much, i am curios about your X11 attempt or whatever you have in mind.
i will take a look into enabling TV out, or do you allready have a clue how to enable it?
for partition resizeing in windows i recommend this tool, it is portable and can resize the partition without erasing the first 32MB
mde-free-portable.zip
最近编辑记录 neotendo (2022-10-06 19:40:43)
离线
@Situ
i just found out that your dual boot uboot did not start on the tft1 (variant=3) version, nothing happens(or it starts the stock rom, cant really tell cause my stock rom is wiped).
i tried an older working uboot source code and copied over your patched start.s and uboot did not boot into linux.
the tft1 version has no multiplex lines, SELECT is on (4*32)+3 (PE3)
PS: I bypassed your dual boot function for the FC3000 V1 TFT T2812-M106-24C-7D until you maybe feel like fixing it
(i have no clue of arm assembler).
kind regards and thank you so much for your work and help
最近编辑记录 neotendo (2022-10-07 06:20:53)
离线
@neotendo
Since the post message MUST be reviewed by administrator before display on this forum, so, some messages were overlooked and disorder. For SaveGame/LoadGame, I will check these issues later. For your solutions (remount, one partition, dirty bit), I think it is okay except dirty bit because we don't need check it. To check dirty bit causes long time waiting for boot. Even if dirty bit turns on, it is not easy to recovery because MicroSD is not a safe storage device. I mean it is hard to recovery back if data is corrupted. For one partiton, in some bootloaders that don't fully implement FAT32 file system, it only reads the first 32 files from FAT32 Table. So, copy order is very important. This is why I prefer 2 partitons in MicroSD. It is just for compatible problem. For RW, in general, we put important system files in first partition and mount as read only in order to prevent data from damaging because MicroSD is not safy storage device. For X11, the progress is 0% so far. For TVout, I have no idea but there are some related settings in U-Boot source code. Maybe, it is a good reference for you.
离线
@neotendo
Thanks for your testing. It is different with other FC3000
660 // FC3000 V1 TFT (Old Version)
661 //
662 else if(suniv_variant == 3) {
663 I_UP = ((32 * 5) + 0);
664 I_DOWN = ((32 * 5) + 5);
665 I_LEFT = ((32 * 5) + 4);
666 I_RIGHT = ((32 * 4) + 2);
667 //(32*4) 0,1,(2=RIGHT),(3=SELECT),(4=START),(5=A),(7=B),(8=Y),(9=X),(6=hangboot)
668 //(32*0) 1,2 = Shutdown menu!?, (3=MENU)
669 I_START = ((32 * 4) + 4);
670 I_SELECT = ((32 * 4) + 3);
TFT 1 => SELECT button, PE3
Others => SELECT button, (PE12=0) PA1
Here is the commit: https://github.com/steward-fu/bootloader/commit/123766b9e1b6639cfd9fe0fff16ae0a21d0172f6
离线
@司徒
really good, thank you very much!
最近编辑记录 neotendo (2022-10-08 03:36:10)
离线
@司徒 大佬我有个F1C100S主板刷了fc3000_ips_od_jutleys_no_roms.img这个固件 屏幕不支持一直闪 是不是屏的驱动不对啊
怎么修改啊
下面这个是我自己的屏
1 GND
2 GND
3 LEDA
4 GND
5 GND
6 VDD
7 GND
8 PD19
9 PD18
10 PD20
11 PD21
12 PD0
13 PD17
14 PD16
15 PD15
16 PD14
17 PD13
18 PD12
19 PD11
20 PD10
21 PD8
22 PD7
23 PD6
24 PD5
25 PD4
26 PD3
27 PD2
28 PD1
29 GND
30 GND
离线
@zjzixuan
你需要先知道屏的參數規格,接著才知道如何做下一步,屏的驅動在這邊:https://github.com/steward-fu/kernel/blob/f1c100s_fc3000_linux-4.14.0/drivers/video/fbdev/sunivfb.c
离线
@zjzixuan
can you provide what is written on your LCD or LCD Ribbon cable?
ex: WL-28H105-A1 or T2812-M106-24C-7D
离线
@司徒
your start.S commit did not work, sorry.
离线
@neotendo 屏上的信息 YZTM081 JH011611
离线
@neotendo 屏上的信息 YZTM081 JH011611
ok, another unknown display. do you tried different images?
if not, try the ips2 first please.
hint: if you look from an another angle onto your display and your images stays the the, you have an IPS display, if your image differs or inverts / change colors, you have an TFT display.
https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_ips2_od_jutleys_no_roms.img.7z
https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_old_tft_od_no_roms.7z
https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_tft1_T2812_M106_24C_7D.7z
最近编辑记录 neotendo (2022-10-08 20:03:13)
离线
Debian 10 (Buster) with XFCE4 Desktop on FC3000 handheld (ARM9 486MHz)
https://whycan.com/files/members/3145/2_20221008-2249.jpg
just amazing <3 , looks like bpp / pitch or something is wrong, but looking very good so far.
离线
CPU Usage is pretty well on Debian 10 xfce4 (F1C100S @486MHz) ~
https://whycan.com/files/members/3145/2_20221009-0003.jpg
what a genius!!!
now add 3D acceleration support , hahaha , just kidding
离线
Debian 7 (Wheezy) on FC3000 Handheld
司徒最後決定使用 Debian 7 (Wheezy),因為跑在 F1C100S ARM9 CPU:486MHz, RAM:32MB, SWAP:512MB 下,速度算是可以接受,當然,如果更換成 F1C200S(RAM 64MB) 會更好,CPU超頻後,整體運作速度應該也會更順暢,司徒把製作步驟寫下來,如果玩家想更換成 Debian 10 (Buster) 系統就可以自己更換,當然,可以在 FC3000 掌機上編譯、執行程式,是司徒重新購買 FC3000 的主要目標,很高興這個目標可以達成,因此,在此分享成果給大家~
Kernel: https://github.com/steward-fu/kernel/tree/f1c100s_fc3000_linux-4.14.0_debian
Bootloader: https://github.com/steward-fu/bootloader/tree/f1c100s_fc3000_uboot-2018.01
製作好的燒錄檔案(root:root, user:user): https://github.com/steward-fu/fc3000/releases/download/v1.0/fc3000_ips2_debian7.img.7z
製作Debian系統:
$ cd
$ sudo apt-get install binfmt-support qemu qemu-user-static debootstrap
$ sudo debootstrap --arch armel --foreign wheezy wheezy http://archive.debian.org/debian/
$ sudo chroot wheezy /debootstrap/debootstrap --second-stage
$ sudo mount -o bind /dev wheezy/dev
$ sudo mount -o bind /sys wheezy/sys
$ sudo mount -o bind /proc wheezy/proc
$ sudo chroot wheezy
# passwd
# adduser user
# nano /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib non-free
deb http://deb.debian.org/debian-debug/ buster-debug main contrib non-free
# apt-get update
# apt-get install lxde obconf openbox lxdm lxde-common xbindkeys xdotool -y
# nano home/user/.xbindkeysrc
"xdotool mousemove_relative 10 0"
Right
"xdotool mousemove_relative -- -10 0"
Left
"xdotool mousemove_relative 0 -10"
Up
"xdotool mousemove_relative 0 10"
Down
"xdotool click 1"
m:0x0 + c:65
"xdotool click 3"
m:0x1 + c:50
# nano /etc/lightdm/lightdm.conf
autologin-user=user
# nano /etc/inittab
1:2345:respawn:/sbin/getty -L ttyS0 115200 vt100
# nano /etc/rc.local
/usr/bin/xbindkeys -f /home/user/.xbindkeysrc
# nano /etc/fstab
/swap.img none swap sw 0 0
# dd if=/dev/swap.img of=/swap.img bs=1M count=512
# mkswap /swap.img
# exit
$ sudo umount wheezy/dev
$ sudo umount wheezy/sys
$ sudo umount wheezy/proc
編譯Kernel
$ cd
$ wget https://github.com/steward-fu/miyoo/releases/download/v1.0/toolchain.7z
$ 7za x toolchain.7z
$ sudo mv miyoo /opt
$ git clone https://github.com/steward-fu/kernel
$ cd kernel
$ git checkout f1c100s_fc3000_linux-4.14.0_debian
$ ARCH=arm make suniv-debian_defconfig
$ ./tools/make_suniv.sh fc3000_ips2
準備一張MicroSD並分割成如下:
編譯Bootloader並且燒錄到MicroSD
$ cd
$ git clone https://github.com/steward-fu/bootloader
$ cd bootloader
$ git checkout f1c100s_fc3000_uboot-2018.01
$ ARCH=arm make suniv_defconfig
$ ./tools/make_suniv.sh /dev/sdX fc3000
P.S. 如果不想手動自己安裝,可以使用司徒打包好的燒錄檔案(fc3000_ips2_debian7.img.7z, root:root, user:user)
系統穩定時間大約需要三分鐘(F1C100S CPU:486MHz, RAM:32MB, SWAP:512MB)
記得連接FC3000 UART,這樣就可以有Terminal操作的功能
按鍵映射(滑鼠左、右鍵需要長按大約3秒再放開)
司徒打包的燒錄檔案有包含許多編譯器套件,這樣就可以直接在FC3000上面做開發的工作,首先,試試Hello, world!
$ cd
$ gcc hello.c -o hello
$ ./hello
hello, world!
接著試試SDL 1.2(sdl.c)
#include <stdio.h>
#include <stdlib.h>
#include <SDL.h>
int main(int argc, char** argv)
{
SDL_Rect rt={0};
SDL_Surface* screen;
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(150, 150, 16, SDL_HWSURFACE);
SDL_FillRect(screen, &screen->clip_rect, SDL_MapRGB(screen->format, 0xff, 0x00, 0x00));
rt.x = 0;
rt.y = 0;
rt.w = 30;
rt.h = 30;
SDL_FillRect(screen, &rt, SDL_MapRGB(screen->format, 0x00, 0xff, 0x00));
rt.x = 50;
rt.y = 50;
rt.w = 30;
rt.h = 40;
SDL_FillRect(screen, &rt, SDL_MapRGB(screen->format, 0x00, 0x00, 0xff));
SDL_Flip(screen);
SDL_Delay(3000);
SDL_Quit();
return 0;
}
編譯SDL 1.2並且執行
$ export DISPLAY=:0
$ gcc sdl.c -o sdl -lSDL -I/usr/include/SDL
$ ./sdl
接著試試GTK(gtk.c)
#include <gtk/gtk.h>
int main(int argc, char** argv)
{
GtkWidget *win;
GtkWidget *label;
gtk_init(&argc, &argv);
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
label = gtk_label_new("Hello, world!");
gtk_container_add(GTK_CONTAINER(win), label);
gtk_widget_show_all(win);
g_signal_connect(win, "destroy", G_CALLBACK(gtk_main_quit), NULL);
gtk_main();
return 0;
}
編譯GTK並且執行
$ export DISPLAY=:0
$ gcc -o gtk gtk.c `pkg-config --libs --cflags gtk+-2.0`
$ ./gtk
接著試試QT(qt.cpp)
#include <QApplication>
#include <QWidget>
#include <QLabel>
int main(int argc, char** argv)
{
QApplication app(argc, argv);
QWidget *win;
QLabel *label;
win = new QWidget;
label = new QLabel("Hello, world!", win);
win->show();
return app.exec();
}
qt.pro
TARGET = qt
SOURCES = qt.cpp
編譯QT並且執行
$ export DISPLAY=:0
$ qmake
$ make
$ ./qt
离线
@司徒
离线
@司徒
The Master of the Universe,how talented you are!?
Very impressive.
Do the fc3000 has otg support? I mean you can connect an joypad, maybe you can connect otg adapter, usb hub, mouse + keyboard and so on
离线
@zjzixuan
I saw your lcd ribbon and pcb pictures, looks not like an FC3000 handheld.
So our FC3000 images are not for your hardware if i see it correct.
离线
@司徒 原固件里有屏的驱动 不知道怎么提取http://ys-j.ysepan.com/144276938/419683995/j54535S3X84M6iTVSgXb2/f1c100s.img
离线
@司徒 原固件里有屏的驱动 不知道怎么提取http://ys-j.ysepan.com/144276938/419683995/j54535S3X84M6iTVSgXb2/f1c100s.img
in most cases you can not extract an driver and use it in other linux system, only if both are based on same code or so.
besides that, you can not do much with only the driver.
hope i am right with my hypothesis.
离线
@situ
do have have a little bit time for the old v1 tft1 uboot dual boot?
your commit did not work, sorry.
and i should tell you, a very big thank's and greetings from the 4PDA.RU forum
最近编辑记录 neotendo (2022-10-10 23:47:41)
离线
@neotendo
Thanks for your efftors and welcome all of friends from the 4PDA.RU forum
Here is the new commit for testing
https://github.com/steward-fu/bootloader/commit/4a4a286c35db6e1ab2dba0a791912dd100f74c3d
The provided image works on my FC3000, thanks neotendo
离线
@司徒
Thank you very much for your words❤
I will try your commit today.
离线
Updated Post #1187 with new Download Links for V1 old rev TFT and V2 IPS
@Situ
thanks for your commit, it works now.
离线
@Situ
is it possible to create a fc3000 flasher program for me (flash data into the internal flashrom)?
my idea is, i append my data to be flashed to the flasher program.
pseuso code
uint len_of_data = eof_flasher_program // the len of my data is written on top of my data
uint data_to_be_flashed_offset = eof_flasher_program + 0x0A
for ... len_of_data_offset
{
write( flash, data_to_be_flashed_offset ++ )
}
mydata
0x00 11 22 33 44 00 00 00 00 00 // "header" first 4 byte are 32bit len of data
0x0A FF FF FF AA AA AA AA BB BB // begin of data
hope you understand what i mean. thank you in advance
最近编辑记录 neotendo (2022-10-11 23:50:52)
离线
@EVERYONE
here we are!!!! the new FC3000 V2 IPS (WL-28H105-A1) Linux Firmware with Dualboot feature
You can dualboot the device with holding down SELECT button on poweron / reboot
1. Flash image with dd or win32diskimager or other tool to your sdcard
2. Resize partition to your max size of sdcard (keep the first 32MB untouched).
(windows users can use the part tool in archive)
3. Now you can add your favorite roms/isos into the /roms dir
- added all stock roms by Steward
- added reboot link in settings section/tab
- added bootlogos (uboot by steward, kernel by neotendo)
- added experimental usb hid host/otg support (testers welcome)
- added retroarch
- added 3 Duke Nukem 3D Links in Games section (with more gore/guts)
- Standard Atomic Edition
- XXX Nude patch
- Experimental Voxel Graphics
- updated snes9x4d
- updated pocketsnes
- updated fba
- added picodrive SegaCD/MegaCD link
- added regionfree sega/mega-CD bioses
- added SonicMegamix.iso
- added smsplus GameGear link
- changed some emulator settings
- added 2 new skins by TOX from 4pda forum
- and some more i can't remember smile
!!! DOWNLOADS !!!
V2 IPS (WL-28H105-A1) Image
https://drive.google.com/file/d/1sQHgIMvor9XyCdwoXLRgHMSkZN1qS8jd/view?usp=sharing
V1 TFT (T2812-M106-24C-7D) Image
https://drive.google.com/file/d/1kBBnL8WCpxwLgLxh2xZYLNaKy5R2yXvK/view?usp=sharing
V1 IPS (RB411-11A) Image
https://drive.google.com/file/d/1hssvVfCFVgUeO1uWj2B4d9mKVF-33rJE/view?usp=sharing
V2 TFT (T2815-M110-24C-25) Image
https://drive.google.com/file/d/16G0K0Dselu3h1lemog4blSduMjYsXEtA/view?usp=sharing
!!! I SEARCH THE STOCK FIRMWARE OF THE V1 TFT T2812-M106-24C-7D,
IS SOMEONE WILLING TO DUMP THE FIRMWARE PLEASE? THANK YOU !!!
@MOD: Please Delete post #1187, thank's
最近编辑记录 neotendo (2022-10-12 01:38:49)
离线
@neotendo
Thanks for updating download links. For SPI flash, may I know why do you need such tool or program ?
I want try to program a little logo display program or so.
My FC3000 v1 tft is wiped as i tried your images the first time (cause my device was not compatible, and flashed accidently the wrong file🤷🏻)
And as long i have no stock rom for it, i want something on the display instead a dead screen.
Just for fun
最近编辑记录 neotendo (2022-10-12 12:02:44)
离线
Here is a video of the new FC3000 firmware (crappy recording, looks much better in reallife)
离线
@司徒
regarding your dump tool from https://whycan.com/t_6647_5.html#p81824
i have a kind user in another forum who is willing to dump his v1 tft stock rom.
can he use this tool? i think that was for dumping the old stock rom right`?
最近编辑记录 neotendo (2022-10-12 17:28:43)
离线
@Situ
i have an user from spain, he has the RB411-11A display, he downloaded my RB411-11A linux image but his display stays black.
i tried to recompile the uboot and gave him the image, stil black screen.
can you please compile a IPS1 (RB411-11A) uboot for me or look into source code why his display stays black?
maybe compiling a new uboot.img is enough and the issue lies at me.
thank you very much
PS:
I saw in the ips kernel patch file the last 2 lcd init cmd/data are
Lcd_Cmd(0x1020)
Lcd_Dat(0x1020)
But in your new kernel and uboot code, there is only
Lcd_Cmd(0x1020)
Is that correct or can be that the fault?
最近编辑记录 neotendo (2022-10-13 06:55:33)
离线
@neotendo
Yes, this tool is only for dumping stock rom.
Here is the dump tool you can use to dump firmware from another FC3000:
https://github.com/steward-fu/fc3000/releases/download/v1.0/ips_fc3000_dump_0627_1.img.7z
Step 1: extract ips_fc3000_dump_0627_1.img.7z
Step 2: flash image into MicroSD as the following command
$ sudo dd if=ips_fc3000_dump_0627_1.img of=/dev/sdX bs=1M
Step 3: put this MicroSD into another FC3000 and then power on
Step 4: wait for 10 minutes and then power off
Step 5: provide v1rom.img back to me and I will create restore tool for you
离线
@Situ
i looked into your uboot/drivers/video/fc3000_ips1.c and fc3000_tft1.c source code, both initial codes are the same.
is it possible that something went wrong?
ips1 should be the RB411-11A initial code right?
离线
@neotendo
Thanks for your information. Yes, the initial code of IPS v1 should be RB411-11A. You can provide PR to this repo for this issue.
ok, i got the RB411-11A image working, it was the wrong initial code.
离线
The v1 ips1 version is broken.
The lcd init code was wrong, uboot bootlogo has wrong colors and the L and R buttons do not work as it should.
I solved the init code and uboot bootlogo issue.
Now i need to get L and R buttons to work right.
I will upload any linux image updates to google drive, the download links keeps still the same when overwriting the file.
So my post with the download links are always uptodate.
Nice feature
离线
Tool for keypad testing
Source code: https://github.com/steward-fu/goodies
Run on PC
Run on FC3000
prebuilt binary: keytest_20221014.zip
离线
@Situ
thank you <3
离线