[Cloud Vision] Unable to authenticate by passing in key file

Other Google API PHP Client packages (e.g Datastore) allow you to pass in a key file to authenticate the client with.
The readme for Cloud Vision links the authentication section to a page that specifies we can pass in a keyFile or keyFilePath to authenticate with rather than setting an environment variable.
However, when trying to pass a keyFile or keyFilePath in, the client will not successfully authenticate and you will get a ValidationException for Could not construct ApplicationDefaultCredentials..
Environment details

OS: Windows (running code inside an Ubuntu Docker image)
PHP version: 7.2.4
Package name and version: google/cloud-vision 0.19.1

Steps to reproduce

Attempt to use the ImageAnnotator like below
When running the code, observe that you get an error:

Could not construct ApplicationDefaultCredentials

Code example
new ImageAnnotatorClient([
    'keyFile' => json_decode(file_get_contents(__DIR__ . '/auth.json'), true)
    // OR  'keyFilePath' => __DIR__ . '/auth.json',
 ]);

The temporary workaround to get the API client has been to use the below:
putenv("GOOGLE_APPLICATION_CREDENTIALS=" . __DIR__ . '/auth.json');
$this->imageAnnotator = new ImageAnnotatorClient();

This isn't really a viable solution as my codebase interacts with a couple of different projects inside GCP, hence the need to be able to pass a key file.

Interestingly if you use the VisionClient instead of the ImageAnnotatorClient then you can pass in the key file without issue:
// This works
new VisionClient([
    'keyFilePath' => __DIR__ . '/auth.json',
]);

Hi @jryd,
Keyfiles for clients such as Google\Cloud\Vision\V1\ImageAnnotatorClient may be provided using the credentials array key, like so:
use Google\Cloud\Vision\V1\ImageAnnotatorClient;

$v = new ImageAnnotatorClient([
    'credentials' => '/path/to/keyfile.json'
]);

As @jdpedrie mentioned, there is a slightly different way to configure credentials for our generated clients vs. our manually written ones. We will be bridging this gap in the future so there is only need to know one set of configuration options :).

Not sure why this is a closed issue, also not finding this anywhere in the documentation or examples.  I'd suggest re-opening this and closing it either a. when you bridge the gap or b. document this somewhere @dwsupplee

I had this very issue and thought I'd blindly tried every combination of key, keyFile and credentials, however I thought that credentials was an object containing the keyFile, I hadn't tried just giving it a string to the .json key file.
The code provided https://github.com/googleapis/google-cloud-php/issues/1661#issuecomment-460649702 should as acidjazz says, be added to the documentation and examples.
$v = new ImageAnnotatorClient([
    'credentials' => '/path/to/keyfile.json'
]);

I'd also love to see more examples of outputting the results. Even with IDE autocompletion and the docs it's hard to know how to get all the data (I'm in the process of trying to replicate the usual JSON response using PHP which is dealing with the Protocol Buffers response from what I can tell.

@kublermdk You nailed it, thanks a lot, I just spent hours because I used the recommended keyFilename instead of  credentials.

@netwons

im not work

That code is all over the place. You don't use the $v client.
putenv('GOOGLE_APPLICATION_CREDENTIALS=' . $credentialsLocation); // This might work, but didn't for me.

$imageAnnotatorClient = new ImageAnnotatorClient([
    'credentials' => $credentialsLocation // this works for me
]);

$response = $imageAnnotator->textDetection($gsFilePath);
$textAnnotation = $response->getTextAnnotations();

// -- Full JSON output
echo ($textAnnotation->serializeToJsonString());

// -- Alternative option: Go through each of the entries to get just the data you want
$text = (array)$textAnnotation;

$textAnnotations = [];
foreach ($textAnnotation as $text) {

    $vertices = $text->getBoundingPoly()->getVertices();
    $bounds = [];
    foreach ($vertices as $vertex) {
        $bounds[] = ['x' => $vertex->getX(), 'y' => $vertex->getY()];
    }
    $textAnnotations[] = [
        'description' => $text->getDescription(),
        'boundingPoly' => [
            'vertices' => $bounds
        ]

    ];
}

echo (json_encode($textAnnotations));

Side note: When getting an AutoMlClient or PredictionServiceClient I only needed to set the environment.

I am testing with a simple code.  But , "textDetection" doesn't run without an error message.
can I know what is the problem?
try {
$imageAnnotatorClient = new ImageAnnotatorClient([
'credentials' => 'key.json'
]);
        $image=file_get_contents($_FILES['image']['tmp_name']);
        $imageContent=base64_encode($image);
        echo "test1"; // printed

        $response = $imageAnnotatorClient->textDetection($imageContent);
        echo "test2"; //not printed
        $text = $response->getTextAnnotations();
        echo $text[0]->getDescription();

        if ($error = $response->getError()) {
            print('API Error: ' . $error->getMessage() . PHP_EOL);
        }

        $imageAnnotatorClient->close();
    } catch(Exception $e) {
        echo $e->getMessage();
    }


Something broken the background drawing.

It is also advisable to always test with a modal dialog box to check the background design of the previous visible toplevel.

Heck, I didn't even know you could drag windows like that. ;-)

Lol for a long time. This case is on Windows but on Linux it also works. As you can see the mouse is working fine on Windows, at least with me. Now we can change the point of click so that instead of being in the MenuBar, it will only be activated in the word, it will be activated in the width of the MenuItem.


Bubble sort

Fixes #[3]
Language: [JavaScript]

The filename should start with capital letter. Code should be modular, try making a bubble sort function

@nimit95 check now.


chore: bump flake8 to v4 and add autopep8

closes #86

FYI @madpah
this one will bring latest flake8 and add more QA


Update MultiTarget.md

Fix a typo

Codecov Report

Merging #1506 into master will decrease coverage by 0.73%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1506      +/-   ##
==========================================
- Coverage   88.41%   87.67%   -0.74%
==========================================
  Files           5       24      +19
  Lines         164     1063     +899
  Branches        0       96      +96
==========================================
+ Hits          145      932     +787
- Misses         19      129     +110
- Partials        0        2       +2

Impacted Files
Coverage Δ

Sources/ReactiveMoya/SignalProducer+Response.swift
90.38% <0%> (-0.53%)
:arrow_down:

Sources/RxMoya/Single+Response.swift
100% <0%> (ø)
:arrow_up:

Sources/Moya/Cancellable.swift
100% <0%> (ø)

Sources/Moya/MoyaProvider+Internal.swift
92.73% <0%> (ø)

Sources/Moya/Response.swift
88.67% <0%> (ø)

Sources/Moya/Plugins/NetworkActivityPlugin.swift
100% <0%> (ø)

Sources/Moya/AnyEncodable.swift
100% <0%> (ø)

Sources/Moya/MultipartFormData.swift
59.25% <0%> (ø)

Sources/Moya/MoyaProvider+Defaults.swift
89.65% <0%> (ø)

Sources/Moya/URLRequest+Encoding.swift
86.36% <0%> (ø)

... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 268b4c6...450040a. Read the comment docs.

Thanks a lot for contributing to Moya! I've invited you to join the Moya GitHub organization – no pressure to accept! If you'd like more information on what that means, check out our contributor guidelines and feel free to reach out with any questions.


Samsung B310E

I have been trying to run doom on my Samsung B310E
I have no idea where to start
everything runs successfully but my samsung is just stuck at a black screen even though
I've done everything right (both Duke3D and Doom)
I'm on linux right now and only used the prebuilt binaries
if you want me to test anything I'd be happy to (running of RAM no sd card)

I just ran usb/fptest.bin and the command spd_dump ran successfully but the phone is still just a black screen

Because you need to compile the program from the libc_server folder. And run it after spd_dump.
This is my template script for launching games:
#!/bin/bash

game="test"

run_game() {
	./spd_dump \
		fdl nor_fdl1.bin 0x40004000 \
		fdl fp$game.bin ram
	test $? = 0 && cd workdir && {
		../libc_server -- $@
		cd ..
	}
}

make all && {
	args="$game 123 456 789"
	run_game --bright 50 --charge 2 $args
}

The current directory should contain:
spd_dump - host binary
libc_server - host binary
fptest.bin - binary for phone, compiled for USB mode
workdir - folder, files from which libc_server will transfer to fptest.bin running on the phone.

make: *** No rule to make target 'all'.  Stop.

make all

Makefile is something like this. But you can just manually move the listed files.
.PHONY: all clean

all: spd_dump/spd_dump libc_server/libc_server

clean:
	$(MAKE) -C spd_dump clean
	$(MAKE) -C libc_server clean

spd_dump/spd_dump:
	$(MAKE) -C spd_dump

libc_server/libc_server:
	$(MAKE) -C libc_server

Example script for launching Doom:
#!/bin/bash

game="doom"

run_game() {
	./spd_dump \
		fdl nor_fdl1.bin 0x40004000 \
		fdl fp$game.bin ram
	test $? = 0 && cd workdir && {
		../libc_server -- $@
		cd ..
	}
}

make all && {
	#args="$game -timedemo demo1"
	args="$game"
	run_game --bright 50 --rotate 3 --charge 2 $args
}

You must have a .wad resource file in your workdir that is compatible with vanilla Doom sources. For example doom1.wad from the shareware version.

This makefile does not match the script paths. I just have many different script variants around.
The script corresponding to this makefile will be like this:
#!/bin/bash

game="doom"

run_game() {
	spd_dump/spd_dump \
		fdl nor_fdl1.bin 0x40004000 \
		fdl fp$game.bin ram
	test $? = 0 && cd workdir_$game && {
		../libc_server/libc_server -- $@
		cd ..
	}
}

make && {
	args="$game"
	run_game --bright 50 --rotate 3 --charge 2 $args
}

running this (without make cuz it not work messed up directories)
#!/bin/bash

game="doom"

run_game() {
	./spd_dump \
		fdl nor_fdl1.bin 0x40004000 \
		fdl fp$game.bin ram
	test $? = 0 && cd workdir && {
		../libc_server -- $@
		cd ..
	}
}

args="$game 123 456 789"
run_game --bright 50 --charge 2 $args

and this time I would get this:
Waiting for connection (300s)
BSL_REP_VER: "SPRD3\0"
BSL_REP_VER: "Custom FDL1: CHIP ID = 0x6530c000\0"
timeout reached

actually I did this before (the --verbose 2)
here is the final output:
recv (8):
7e 00 80 00 00 ff 7f 7e                          |~......~|
send (8):
7e 00 03 00 00 ff fc 7e                          |~......~|
recv (8):
7e 00 80 00 00 ff 7f 7e                          |~......~|
send (8):
7e 00 04 00 00 ff fb 7e                          |~......~|
timeout reached

send (8):
7e 00 04 00 00 ff fb 7e

This is:
	BSL_CMD_EXEC_DATA            = 0x04, /* Execute from a certain address */

Means that the game binary is loaded into the phone's RAM and is running, but it is not responding.
Are you sure you are using the USB binary and not the one from the sdcard/fpbin folder?
Try running fptest.bin first.

I have been literally using the sd card one lol
but now we are back to square one... the libc_server works but still a black screen
(usb/fptest.bin)

Can you compile the fptest binary yourself and put some prints around?

I have only made a simple game in C and Raylib
as I said, I have only used the precompiled binaries

should I enable something like SPI?

Get android-ndk-r26d-linux.zip (same version I'm using) from here:
Extract it anywhere. Create a link to android-ndk-r26d in your home folder.
Now use this script, let's call it build_test.sh, if you put the fpdoom source repository in the current directory, it will build fptest.bin.
#!/bin/bash
NDK=$HOME/android-ndk-r26d
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm
CLANG=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang

cd fpdoom

test -f pack_reloc/pack_reloc || make -C pack_reloc

cd fptest && {
	make clean all TOOLCHAIN=$TOOLCHAIN CC=$CLANG LIBC_SDIO=0 2>&1 | tee ../../build.log
	cp fptest.bin ../..
}

just did that and used the manually compiled fptest.bin and now it's working

DBG_LOG("pinmap_trace: 0x%08x, 0x%08x\n", addr, val);
sys_wait_ms(500);

This will print out how the CPU pins are initializing. It will wait half a second after each change. So we'll find what was last before the hang.

At the beginning of syscode.c there are the following lines:
#ifndef CHECK_ADI
#define CHECK_ADI 0
#endif

Try replacing CHECK_ADI 0 with CHECK_ADI 1.
I'll try to find what these registers refer to.

I've noticed some weird code in the firmware for the SC6530 that doesn't seem to do anything, but may be needed for some versions of the chip:
https://github.com/ilyakurdyukov/fpdoom/blob/8169157abc61f68dc38f63038a451fe07b2d7847/fpdoom/init_sc6530.h#L46-L49
Try changing #if 0 with #if 1.
If this doesn't change anything, try skipping the initialization of these pins:
		} else break;
		DBG_LOG("pinmap_trace: 0x%08x, 0x%08x\n", addr, val);
-		sys_wait_ms(500);
+		//sys_wait_ms(500);
+		if (addr == 0x8c0002a4) break;
	}

ok so the second one didn't change anything but the first one (the #if one) actually did this:
Waiting for connection (300s)
BSL_REP_VER: "SPRD3\0"
BSL_REP_VER: "Custom FDL1: CHIP ID = 0x6530c000\0"
!!! entry
malloc heap: 4147072 bytes
keymap = 0x300cf154
pinmap = 0x300cf1d4
scan_firmware: 463ms
chip_id: num = 0x6530c000
chip_id: ver = 0x90001
chip_id: adi = 0x1130c000
pinmap_trace: 0x8c000000, 0x0001ffff
pinmap_trace: 0x8c000044, 0x00000134
pinmap_trace: 0x8c000048, 0x00000134
pinmap_trace: 0x8c00004c, 0x00000104
pinmap_trace: 0x8c000050, 0x00000104
pinmap_trace: 0x8c000054, 0x00000104
pinmap_trace: 0x8c000058, 0x00000104
pinmap_trace: 0x8c00005c, 0x00000104
pinmap_trace: 0x8c000060, 0x00000104
pinmap_trace: 0x8c000064, 0x00000104
pinmap_trace: 0x8c000068, 0x00000104
pinmap_trace: 0x8c00006c, 0x00000104
pinmap_trace: 0x8c000070, 0x00000104
pinmap_trace: 0x8c000074, 0x00000104
pinmap_trace: 0x8c000078, 0x00000104
pinmap_trace: 0x8c000084, 0x00000140
pinmap_trace: 0x8c000090, 0x00000101
pinmap_trace: 0x8c000098, 0x00000201
pinmap_trace: 0x8c0000a0, 0x00000201
pinmap_trace: 0x8c0000a4, 0x00000101
pinmap_trace: 0x8c0000a8, 0x00000106
pinmap_trace: 0x8c0000ac, 0x00000106
pinmap_trace: 0x8c0000b0, 0x00000106
pinmap_trace: 0x8c0000b4, 0x00000106
pinmap_trace: 0x8c0000b8, 0x00000106
pinmap_trace: 0x8c0000bc, 0x00000106
pinmap_trace: 0x8c0000c0, 0x00000106
pinmap_trace: 0x8c0000c4, 0x00000106
pinmap_trace: 0x8c0000c8, 0x00000106
pinmap_trace: 0x8c0000cc, 0x00000106
pinmap_trace: 0x8c0000d0, 0x00000106
pinmap_trace: 0x8c0000d4, 0x00000106
pinmap_trace: 0x8c0000d8, 0x00000106
pinmap_trace: 0x8c0000dc, 0x00000106
pinmap_trace: 0x8c0000e0, 0x00000106
pinmap_trace: 0x8c0000e4, 0x00000106
pinmap_trace: 0x8c0000e8, 0x00000104
pinmap_trace: 0x8c0000ec, 0x00000104
pinmap_trace: 0x8c0000f0, 0x00000104
pinmap_trace: 0x8c0000f4, 0x00000104
pinmap_trace: 0x8c0000f8, 0x00000104
pinmap_trace: 0x8c0000fc, 0x00000104
pinmap_trace: 0x8c000100, 0x00000104
pinmap_trace: 0x8c000104, 0x00000104
pinmap_trace: 0x8c000108, 0x00000104
pinmap_trace: 0x8c00010c, 0x00000101
pinmap_trace: 0x8c000110, 0x00000101
pinmap_trace: 0x8c00011c, 0x00000101
pinmap_trace: 0x8c000120, 0x00000106
pinmap_trace: 0x8c000124, 0x00000101
pinmap_trace: 0x8c000128, 0x00000104
pinmap_trace: 0x8c00012c, 0x00000101
pinmap_trace: 0x8c0002bc, 0x00000101
pinmap_trace: 0x8c000130, 0x00000104
pinmap_trace: 0x8c000134, 0x00000104
pinmap_trace: 0x8c000138, 0x00000104
pinmap_trace: 0x8c00013c, 0x00000104
pinmap_trace: 0x8c000144, 0x0000018a
pinmap_trace: 0x8c000148, 0x0000018a
pinmap_trace: 0x8c000150, 0x00000101
pinmap_trace: 0x8c000154, 0x00000140
pinmap_trace: 0x8c000158, 0x00000140
pinmap_trace: 0x8c00015c, 0x00000140
pinmap_trace: 0x8c000160, 0x00000102
pinmap_trace: 0x8c00016c, 0x000001ba
pinmap_trace: 0x8c000170, 0x00000131
pinmap_trace: 0x8c000174, 0x00000175
pinmap_trace: 0x8c000178, 0x000001ba
pinmap_trace: 0x8c00017c, 0x00000140
pinmap_trace: 0x8c000180, 0x0000018a
pinmap_trace: 0x8c000184, 0x0000018a
pinmap_trace: 0x8c000188, 0x0000018a
pinmap_trace: 0x8c00018c, 0x0000018a
pinmap_trace: 0x8c000190, 0x0000018a
pinmap_trace: 0x8c000194, 0x00000131
pinmap_trace: 0x8c000198, 0x00000198
pinmap_trace: 0x8c00019c, 0x00000198
pinmap_trace: 0x8c0001a0, 0x00000101
pinmap_trace: 0x8c0001a4, 0x00000101
pinmap_trace: 0x8c0001a8, 0x00000101
pinmap_trace: 0x8c0001ac, 0x00000101
pinmap_trace: 0x8c0001b0, 0x00000101
pinmap_trace: 0x8c0001b4, 0x00000140
pinmap_trace: 0x8c0001b8, 0x00000176
pinmap_trace: 0x8c0001bc, 0x00000104
pinmap_trace: 0x8c0001c0, 0x00000101
pinmap_trace: 0x8c0001c4, 0x000001b2
pinmap_trace: 0x8c0001c8, 0x00000104
pinmap_trace: 0x8c0001cc, 0x00000104
pinmap_trace: 0x8c0001d0, 0x00000104
pinmap_trace: 0x8c0001d4, 0x00000104
pinmap_trace: 0x8c0001d8, 0x00000104
pinmap_trace: 0x8c0001dc, 0x00000104
pinmap_trace: 0x8c0001e0, 0x00000104
pinmap_trace: 0x8c0001e4, 0x00000104
pinmap_trace: 0x8c0001e8, 0x00000104
pinmap_trace: 0x8c0001ec, 0x00000104
pinmap_trace: 0x8c0001f0, 0x00000101
pinmap_trace: 0x8c0001f4, 0x00000104
pinmap_trace: 0x8c0002d4, 0x00000144
pinmap_trace: 0x8c0002d8, 0x00000144
pinmap_trace: 0x8c0002dc, 0x00000144
pinmap_trace: 0x8c0002e0, 0x00000144
pinmap_trace: 0x8c000200, 0x00000100
pinmap_trace: 0x8c0001fc, 0x00000188
pinmap_trace: 0x8c0001f8, 0x00000188
pinmap_trace: 0x8c000204, 0x00000188
pinmap_trace: 0x8c000208, 0x00000188
pinmap_trace: 0x8c00020c, 0x00000140
pinmap_trace: 0x8c000210, 0x00000140
pinmap_trace: 0x8c000228, 0x00000140
pinmap_trace: 0x8c000214, 0x00000101
pinmap_trace: 0x8c000218, 0x00000101
pinmap_trace: 0x8c00021c, 0x00000101
pinmap_trace: 0x8c00022c, 0x00000141
pinmap_trace: 0x8c000230, 0x00000132
pinmap_trace: 0x8c000234, 0x00000140
pinmap_trace: 0x8c000220, 0x00000101
pinmap_trace: 0x8c000224, 0x00000101
pinmap_trace: 0x8c000248, 0x00000188
pinmap_trace: 0x8c00024c, 0x00000188
pinmap_trace: 0x8c000250, 0x00000100
pinmap_trace: 0x8c000254, 0x00000240
pinmap_trace: 0x8c000258, 0x00000100
pinmap_trace: 0x8c00025c, 0x00000100
pinmap_trace: 0x8c000260, 0x00000100
pinmap_trace: 0x8c000264, 0x00000100
pinmap_trace: 0x8c000268, 0x00000100
pinmap_trace: 0x8c00026c, 0x00000101
pinmap_trace: 0x8c000278, 0x00000188
pinmap_trace: 0x8c000284, 0x00000101
pinmap_trace: 0x8c000270, 0x00000101
pinmap_trace: 0x8c00027c, 0x00000188
pinmap_trace: 0x8c000288, 0x00000101
pinmap_trace: 0x8c000274, 0x00000101
pinmap_trace: 0x8c000280, 0x00000188
pinmap_trace: 0x8c00028c, 0x00000101
pinmap_trace: 0x8c000294, 0x00000170
pinmap_trace: 0x8c000298, 0x0000019a
pinmap_trace: 0x8c00029c, 0x00000111
pinmap_trace: 0x8c0002a0, 0x00000140
pinmap_trace: 0x8c0002a4, 0x00000231
pinmap_trace: 0x82001874, 0x0000018a
pinmap_trace: 0x82001850, 0x0000018a
pinmap_trace: 0x82001878, 0x0000010a
pinmap_trace: 0x8200187c, 0x00000100
pinmap_trace: 0x82001884, 0x00000100
pinmap_trace: 0x82001880, 0x00000101
connection closed

I'm just a simple C guy who made an x86 OS that prints hi (using 0xb8000)
while you're someone who started from nothing to fully working ports of games to phones
I thought I'd just throw in the trash!
I wish I could be like you who actually knows what he is doing!

Try putting a trace print here. For example like this:
DBG_LOG("lcm_init trace 1\n");

Check if the execution reaches this point.
If it does, then place prints between the following lines to find where it hangs. In fact, we are now doing printf debugging, which many people despise. But we do not have any tools to do it differently.

ngl the printf debugging method is the best in my opinion
it's time consuming but at least it u can spot problems with it

In issue 8, execution would get to this point and hang due to initialization of a certain pin, which would cause a hang after a short time. That's why I suggested putting a wait between trace prints when initializing pins. The pins are initialized according to the table from the firmware, because phones can be very different with different settings.

if (IS_SC6530 || !is_whtled_on()) lcm_reset(32, 0);
DBG_LOG("lcm_init trace 1\n");

I tried the previous lines (the AHB_POWER_ON and LCM_CR variable ones)
and it did print the lcm_init trace 1
but after the if statement it doesn't

This code resets the LCD controller. Which includes several waits for a total of ~100ms.
if (IS_SC6530 || !is_whtled_on()) lcm_reset(32, 0);

You can try to comment out this code, but I have a feeling that this is the same situation as in issue 8, some pin leads to a delayed hang.

new output:
# same as before
LCD: clk_rate = 104000000
LCD: id = 0x5ca1f1
connection closed

You can try to comment out this code, but I have a feeling that this is the same situation as in issue 8, some pin leads to a delayed hang.

Looks like it's really the same as issue 8.
Go back to the code in pin_init() and set a 1 second delay after each pin is initialized:
		DBG_LOG("pinmap_trace: 0x%08x, 0x%08x\n", addr, val);
		sys_wait_ms(1000);

This will take a long time, but you need to find after which specific pin it hangs.

# a lot of pins
pinmap_trace: 0x8c000274, 0x00000101
pinmap_trace: 0x8c000280, 0x00000188
pinmap_trace: 0x8c00028c, 0x00000101
pinmap_trace: 0x8c000294, 0x00000170
pinmap_trace: 0x8c000298, 0x0000019a
pinmap_trace: 0x8c00029c, 0x00000111
pinmap_trace: 0x8c0002a0, 0x00000140
pinmap_trace: 0x8c0002a4, 0x00000231
connection closed

I think this 0x8c0002a4 is causing waaaay too many issues
what does it do?

pinmap_trace: 0x8c000084, 0x00000140
pinmap_trace: 0x8c000090, 0x00000101
pinmap_trace: 0x8c000098, 0x00000201
pinmap_trace: 0x8c0000a0, 0x00000201
pinmap_trace: 0x8c0000a4, 0x00000101
pinmap_trace: 0x8c0000a8, 0x00000106
unknown command

running it again without any changes and this happend

pinmap_trace: 0x8c000000, 0x0001ffff
pinmap_trace: 0x8c000044, 0x00000134
pinmap_trace: 0x8c000048, 0x00000134
pinmap_trace: 0x8c00004c, 0x00000104
pinmap_trace: 0x8c000050, 0x00000104
pinmap_trace: 0x8c000054, 0x00000104
pinmap_trace: 0x8c000058, 0x00000104
pinmap_trace: 0x8c00005c, 0x00000104
pinmap_trace: 0x8c000060, 0x00000104
pinmap_trace: 0x8c000064, 0x00000104
pinmap_trace: 0x8c000068, 0x00000104
unknown command

the built-in OS works perfectly

I have been doing this cuz I can't power on my phone using only USB
I remove battery... wait then plug it back and run spd_dump, hold boot button (center) then plug the USB cable

Strange, my B310E can boot without battery, only from USB power. I connect it without battery while holding down the boot key.

so is this a dead end?

I wonder if there were different revisions of the SC6530C chip. I initially assumed the watchdog timer in issue 8, could there be a timer? But I have not yet seen the watchdog timer activated on boot.

so we activate it?

I think communicating using github issues is way too slow
can we use something like discord and when u discover the solution we post it here for everybody else?

Try inserting an infinite timer report before pin_init(). How long will it last? Will it run forever? Or will it stop at some value? If it stops, will it always stop at the same time? Or does it only stop after or during pin_init() but not before?
 void sys_init(void) {
 	init_charger();
 	init_chip_id();
+	for (;;) {
+		DBG_LOG("time: %u ms\n", sys_timer_ms());
+		sys_wait_ms(50);
+	}
 	pin_init();

it looks like the timer is going forever...

since doom is working on your b310e can you send me your files? (nor_fdl1.bin, fpdoom.bin, etc...)

disabling the timer made the fptest.bin work??? I have no idea but thanks for ur help!

to anyone who was wondering... just fix the damn watchdog timer!!! or check the pin that's causing issues and skip it maybe
thanks now everything for some reason just works out of the box!

disabling the timer made the fptest.bin work??? I have no idea but thanks for ur help!

Did you get it working? What did you do exactly?

Actually have no idea! here is the whole code:
syscode.c:
#include "common.h"
#include "syscode.h"

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define DBG_LOG(...) fprintf(stderr, __VA_ARGS__)
#define ERR_EXIT(...) do { \
	fprintf(stderr, "!!! " __VA_ARGS__); \
	exit(1); \
} while (0)

#define FATAL() ERR_EXIT("error at syscode.c:%d\n", __LINE__)

#define IS_SC6530 (_chip == 3)

#ifndef CHECK_ADI
#define CHECK_ADI 1
#endif

#if CHECK_ADI
#define ADI_WAIT_DEF uint32_t t0, t1;
#define ADI_WAIT_INIT t1 = sys_timer_ms();
#define ADI_WAIT(cond) t0 = t1; \
	while (cond) if ((t1 = sys_timer_ms()) - t0 > 60) FATAL();
#else
#define ADI_WAIT_DEF
#define ADI_WAIT_INIT
#define ADI_WAIT(cond) while (cond);
#endif

uint32_t adi_read(uint32_t addr) {
	uint32_t a, rd_cmd = 0x82000008; // REG_ADI_RD_CMD
#if CHECK_ADI
	uint32_t fifo_sts = rd_cmd - 4; // REG_ADI_FIFO_STS
	uint32_t bit = 1 << 21; // BIT_FIFO_EMPTY
	ADI_WAIT_DEF
	if (_chip != 1) rd_cmd += 0x10, fifo_sts += 0x1c, bit >>= 13;
	ADI_WAIT_INIT
	ADI_WAIT(!(MEM4(fifo_sts) & bit))
	// if ((addr ^ 0x82001000) >> 12) FATAL();
	MEM4(rd_cmd) = addr &= 0xfff;
	// REG_ADI_RD_DATA, BIT_RD_CMD_BUSY
	ADI_WAIT((a = MEM4(rd_cmd + 4)) >> 31);
	if (_chip != 1) a &= 0x1fffffff;
	if (a >> 16 != addr) FATAL();
#else
	if (_chip != 1) rd_cmd += 0x10;
	// if ((addr ^ 0x82001000) >> 12) FATAL();
	MEM4(rd_cmd) = addr & 0xfff;
	// REG_ADI_RD_DATA, BIT_RD_CMD_BUSY
	while ((a = MEM4(rd_cmd + 4)) >> 31);
#endif
	return a & 0xffff;
}

void adi_write(uint32_t addr, uint32_t val) {
	uint32_t fifo_sts = 0x82000004; // REG_ADI_FIFO_STS
	uint32_t bit = 1 << 22; // BIT_FIFO_FULL
	ADI_WAIT_DEF
	if (_chip != 1) fifo_sts += 0x1c, bit >>= 13;
	ADI_WAIT_INIT
	ADI_WAIT(MEM4(fifo_sts) & bit)
	MEM4(addr) = val;
	ADI_WAIT(!(MEM4(fifo_sts) & bit >> 1)) // BIT_FIFO_EMPTY
}

// ANA_REG_BASE
// SC6531E: 0x82001400
// SC6530, SC6531DA: 0x82001000

#define AHB_CR(x) MEM4(0x20500000 + (x))
#define AHB_PWR_ON(x) AHB_CR(_chip != 1 ? 0x60 : 0x1080) = (x)
#define AHB_PWR_OFF(x) AHB_CR(_chip != 1 ? 0x70 : 0x2080) = (x)
#define APB_PWR_ON(x) MEM4(0x8b000000 + (_chip != 1 ? 0xa0 : 0x10a8)) = (x)
#define APB_PWR_OFF(x) MEM4(0x8b000000 + (_chip != 1 ? 0xa4 : 0x20a8)) = (x)

static void init_chip_id(void) {
	uint32_t t0, t1, ver = 0, adi;
	if (_chip == 1) {
		t1 = MEM4(0x8b00035c);	// 0x36320000
		t0 = MEM4(0x8b000360);	// 0x53433635
		t0 = (t0 >> 8) << 28 | (t0 << 28) >> 4;
		t0 |= (t1 & 0xf000000) >> 4 | (t1 & 0xf0000);
		t1 = MEM4(0x8b000364);	// 0x00000001
		t0 |= t1;
		switch (t0) {
		case 0x65620000: ver = 0xa0001; break; // SC6531EFM
		case 0x65620001: ver = 0xa0002; break; // SC6531EFM_AB
		default: FATAL();
		}
		adi = 0x82001400 + 4; t1 = adi - 4;
	} else {
		t0 = MEM4(0x205003fc);
		switch (t0) {
		case 0x65300000: ver = 0x90001; break; // SC6530
		case 0x6530c000: ver = 0x90001; break; // SC6530C
		case 0x65310000: ver = 0x90003; break; // SC6531
		case 0x65310001: ver = 0x90003; break; // SC6531BA
		default: FATAL();
		}
		adi = 0x82001000; t1 = adi + 4;
	}
	// ANA_CHIP_ID_{HIGH,LOW}
	adi = adi_read(adi) << 16 | adi_read(t1);
	sys_data.chip_id.num = t0;
	sys_data.chip_id.ver = ver;
	sys_data.chip_id.adi = adi;
	DBG_LOG("chip_id: %s = 0x%x\n", "num", t0);
	DBG_LOG("chip_id: %s = 0x%x\n", "ver", ver);
	if (_chip == 1) {
		t0 = MEM4(0x20500168);
		DBG_LOG("chip_id: %s = 0x%x\n", "ahb", t0);
	}
	DBG_LOG("chip_id: %s = 0x%x\n", "adi", adi);
	// 0x11300000: SR1130
	// 0x1130c000: SR1130C
	// 0x11310000: SR1131
	// 0x11310001: SR1131BA
	// 0x1161a000: SC1161
}

#define gpio_get(id, off) gpio_set(id, off, -1)
static int gpio_set(unsigned id, unsigned off, int state) {
	uint32_t addr, tmp, shl = id & 0xf;
	unsigned n = 0x4c;
	if (_chip >= 2) { n = 0x90; if (IS_SC6530) n = 0xa0; }
	if (id >= n) FATAL();
	if (id >= 128)
		addr = (0x82001780 - (8 << 6)) + ((id >> 4) << 6);
	else addr = 0x8a000000 + ((id >> 4) << 7);
	addr += off;
	if (id >= 128) tmp = adi_read(addr);
	else tmp = MEM4(addr);
	if (state < 0) return tmp >> shl & 1;
	tmp &= ~(1u << shl);
	tmp |= state << shl;
	if (id >= 128) adi_write(addr, tmp);
	else MEM4(addr) = tmp;
	return 0;
}

static void gpio_init(void *ptr) {
	struct {
		int16_t id, val; uint32_t x04, x08;
	} *tab = ptr;
	int i;

	APB_PWR_ON(0x800080);	// GPIO_D

	for (i = 0; tab[i].id != -1; i++) {
		int a = tab[i].id;
		gpio_set(a, 4, 1);	// GPIODMSK
		if (!tab[i].x04) {
			gpio_set(a, 8, 1); // GPIODIR
			gpio_set(a, 0x18, 0);	// GPIOIE
			if (tab[i].val != -1)
				gpio_set(a, 0, (tab[i].val & 0xff) != 0); // GPIODATA
		} else {
			gpio_set(a, 8, 0); // GPIODIR
		}
	}
}

static void pin_init(void) {
	const volatile uint32_t *pinmap = pinmap_addr;
	// workaround for Samsung GT-E1272
	// hangs shortly after this pin is enabled
	uint32_t sc6530_fix = IS_SC6530 && !sys_data.spi ? 0x8c000290 : 0;

	for (;;) {
		uint32_t addr = pinmap[0], val = pinmap[1];
		pinmap += 2;
		if (addr - 0x82001000 < 0x1000) {
			adi_write(addr, val & 0xffff);
		} else if (addr >> 12 == 0x8c000) {
			//if (addr == sc6530_fix) continue;
			if (addr == 0x8c0002a4) continue;
			if (_chip == 1 && addr - 0x8c000114 <= 0x18) {
				// ANA_LDO_SF_REG0
				if (adi_read(0x8200148c) & 1 << 9)
					val |= 0x200000;
				else if (sys_data.chip_id.ver == 0xa0001)
					val |= 0x280000;
			}
			MEM4(addr) = val;
		} else break;
		DBG_LOG("pinmap_trace: 0x%08x, 0x%08x\n", addr, val);
		//sys_wait_ms(1000);
		if (addr == 0xc0002a4) break;
	}
	if (sys_data.gpio_init)
		gpio_init((void*)pinmap);
}

void sys_brightness(unsigned val) {
	unsigned tmp, val2, ctrl;
	if (val > 100) val = 100;

	// ANA_WHTLED_CTRL
	if (_chip == 1) {
		ctrl = 0x82001400 + 0x13c;
		val2 = val = (val * 16 + 50) / 100;
		tmp = adi_read(ctrl) & ~0x1f;
		if (!val) tmp |= 1; else val--;
		adi_write(ctrl, tmp | val << 1);
	} else {
		ctrl = 0x82001000 + 0x220;
		val2 = val = (val * 32 + 50) / 100;
		tmp = adi_read(ctrl) & ~0x5f;
		if (val) val += 0x40 - 1;
		tmp |= IS_SC6530 ? 0x1100 : 0x1200; /* turn off flashlight */
		adi_write(ctrl, tmp | val);
	}
	if (sys_data.bl_gpio != 0xff) {
		int id = sys_data.bl_gpio;
		// check GPIODMSK and GPIODIR
		if (!gpio_get(id, 4) || !gpio_get(id, 8)) FATAL();
		gpio_set(id, 0, val2 != 0); // GPIODATA
	}
}

#define LCM_REG_BASE 0x20800000
#define LCM_CR(x) MEM4(LCM_REG_BASE + (x))
#define LCDC_CR(x) MEM4(0x20d00000 + (x))

enum {
	LCDC_CTRL = 0x00,
	LCDC_DISP_SIZE = 0x04,
	LCDC_LCM_START = 0x08,
	LCDC_LCM_SIZE = 0x0c,
	LCDC_BG_COLOR = 0x10,
	LCDC_FIFO_STATUS = 0x14,

	LCDC_OSD0_CTRL = 0x20,
	LCDC_OSD0_BASE_ADDR = 0x24,
	LCDC_OSD0_ALPHA_BASE_ADDR = 0x28,
	LCDC_OSD0_SIZE_XY = 0x2c,
	LCDC_OSD0_PITCH = 0x30,
	LCDC_OSD0_DISP_XY = 0x34,

	LCDC_OSD1_CTRL = 0x50,
	LCDC_OSD1_BASE_ADDR = 0x54,
	LCDC_OSD1_SIZE_XY = 0x5c,
	LCDC_OSD1_PITCH = 0x60,
	LCDC_OSD1_DISP_XY = 0x64,
	LCDC_OSD1_ALPHA = 0x68,
	LCDC_OSD1_GREY_RGB = 0x6c,
	LCDC_OSD1_CK = 0x70,

	LCDC_OSD4_CTRL = 0xe0,
	LCDC_OSD4_LCM_ADDR = 0xe4,
	LCDC_OSD4_DISP_XY = 0xe8,
	LCDC_OSD4_SIZE_XY = 0xec,
	LCDC_OSD4_PITCH = 0xf0,

	LCDC_IRQ_EN = 0x110,
	LCDC_IRQ_CLR = 0x114,
	LCDC_IRQ_STATUS = 0x118,
	LCDC_IRQ_RAW = 0x11c,
};

typedef struct {
	uint32_t id, id_mask;
	uint16_t width, height;
	uint16_t mac_arg;
	struct { uint8_t /* ns */
		rcss, /* read CS setup */
		rlpw, /* read low pulse width */
		rhpw, /* read high pulse width */
		wcss, /* write CS setup */
		wlpw, /* write low pulse width */
		whpw; /* write high pulse width */
	} mcu_timing;
	struct { uint32_t freq; } spi;
	const uint8_t *cmd_init;
} lcd_config_t;

static struct {
	void (*send)(unsigned, unsigned);
	uint32_t addr;
} lcd_setup;

static void lcm_config_addr(unsigned cs) {
	lcd_setup.addr = cs << 26 | 0x60000000;
}

static void lcm_set_mode(unsigned val) {
	uint32_t cs = sys_data.lcd_cs;
	while (LCM_CR(0) & 2);
	LCM_CR(0x10 + (cs << 4)) = val;
}

static void lcm_send(unsigned idx, unsigned val) {
	while (LCM_CR(0) & 2);
	MEM2(lcd_setup.addr | idx << 17) = val;
}

static uint16_t lcm_recv(unsigned idx) {
	while (LCM_CR(0) & 2);
	return MEM2(lcd_setup.addr | idx << 17);
}

static inline void lcm_send_cmd(unsigned val) { lcm_send(0, val); }
static inline void lcm_send_data(unsigned val) { lcm_send(1, val); }

static void lcm_reset(unsigned delay, unsigned method) {
	uint32_t addr = 0x8b000224, t;
	int i;
	method &= 1;
	for (i = 0; i < 3; i++) {
		t = MEM4(addr) & ~method;
		t |= method ^= 1;
		MEM4(addr) = t;
		sys_wait_ms(delay);
	}
}

static uint32_t get_cpu_freq(void) {
#define X(a) (a / 26)
#define X2(x, a, b, c, d) uint32_t x = \
	X(a) | X(b) << 8 | X(c) << 16 | X(d) << 24;
	X2(t1, 260, 1040, 2080, 2080)
	X2(t2, 260, 2080, 2496, 3120)
	X2(t3, 260, 2080, 1040, 1560)
#undef X2
#undef X
	uint32_t t = t1, addr = 0x8b00004c;
	if (_chip >= 2) {
		t = t2; if (IS_SC6530) t = t3, addr -= 0xc;
	}
	return (t >> (MEM4(addr) & 3) * 8 & 0xff) * 2600000;
}

static uint32_t get_ahb_freq(void) {
	if (IS_SC6530) {
		uint32_t freq = get_cpu_freq();
		if (MEM4(0x8b000040) & 1 << 2) freq >>= 1;
		return freq;
	}
	if (MEM4(0x8b00004c) & 1 << 2) return 208000000 >> 1;
	return get_cpu_freq() >> 1;
}

// worst timings
static void lcm_set_safe_freq(unsigned cs) {
	uint32_t addr = LCM_REG_BASE + 0x10 + (cs << 4);
	uint32_t sum = 30 << 16 | 6 | 0x80;
	sum |= 30 << 21 | 14 << 8 | 6 << 4;
	MEM4(addr) = 1; // lcm_set_mode(1)
	MEM4(addr + 4) = sum;
}

static void lcm_set_freq(unsigned cs, uint32_t clk_rate, const lcd_config_t *lcd) {
	unsigned sum; int t1, t2, t3;

	if (clk_rate > 1000000) clk_rate /= 1000000;
	LCM_CR(0) = 0x11110000;

#define DBI_CYCLES(r, name, max) \
	r = (clk_rate * lcd->mcu_timing.name - 1) / 1000 + 1; \
	if (r > max) r = max;

	DBI_CYCLES(t1, rcss, 6) sum = t1;
	DBI_CYCLES(t2, rlpw, 14) sum += t2;
	DBI_CYCLES(t3, rhpw, 14) sum += t3;
	if (sum > 30) sum = 30;
	sum = sum << 16 | t1 | 0x80;

	DBI_CYCLES(t1, wcss, 6) sum |= t1 << 4;
	DBI_CYCLES(t2, wlpw, 14) sum |= t2 << 8;
	DBI_CYCLES(t3, whpw, 14)
	t2 += t3 - 1 > t1 ? t3 - 1 : t1 + 1;
	// can't happen: 14 + (max(14 - 1, 6 + 1)) < 30
	//if (t2 > 30) t2 = 30;
	sum |= t2 << 21;
#undef DBI_CYCLES

	while (LCM_CR(0) & 2);

	LCM_CR(0x14 + (cs << 4)) = sum;
}

// ID0: LCD module's manufacturer ID
// ID1: LCD module/driver version ID
// ID2: LCD module/driver ID

static uint32_t lcd_cmdret(int cmd, unsigned n) {
	uint32_t ret = 0;
	lcm_send_cmd(cmd);
	do ret = ret << 8 | (lcm_recv(1) & 0xff); while (--n);
	return ret;
}

static unsigned lcd_getid(void) {
#if 1
	return lcd_cmdret(0x04, 4) & 0xffffff;
#else
	unsigned id = 0, i;
	for (i = 0; i < 3; i++) {
		lcm_send_cmd(0xda + i);
		lcm_recv(1); // dummy
		id = id << 8 | (lcm_recv(1) & 0xff);
	}
	return id;
#endif
}

#define LCM_CMD(cmd, len) 0x80 | len, cmd
#define LCM_DATA(len) len
#define LCM_DELAY(delay) 0x40 | (delay >> 8 & 0x1f), (delay & 0xff)
#define LCM_END 0

#include "lcd_config.h"

static const lcd_config_t* lcd_find_conf(uint32_t id, int mode) {
	const lcd_config_t *lcd_config = lcd_config1;
	int i, n = sizeof(lcd_config1) / sizeof(*lcd_config1);
	if (_chip != 1) {
		lcd_config = lcd_config2;
		n = sizeof(lcd_config2) / sizeof(*lcd_config2);
	}
	for (i = 0; i < n; i++)
		if ((id & lcd_config[i].id_mask) == lcd_config[i].id) {
			if (mode == 0) {
				if (lcd_config[i].mcu_timing.rcss) break;
			} else if (mode == 1) {
				if (lcd_config[i].spi.freq) break;
			} else break;
		}
	if (i == n) ERR_EXIT("unknown LCD\n");
	return lcd_config + i;
}

#include "lcd_spi.h"
#include "lcd_mono.h"

static void lcm_exec(const uint8_t *cmd) {
	void (*send_fn)(unsigned, unsigned) = lcd_setup.send;

	for (;;) {
		uint32_t a, len;
		a = *cmd++;
		if (!a) break;
		len = a & 0x1f;
		a >>= 5;
		if (a == 4) {
			send_fn(0, *cmd++);
			a = 0;
		}
		if (a == 0) {
			while (len--) send_fn(1, *cmd++);
		} else if (a == 2) {
			sys_wait_ms(len << 8 | *cmd++);
		} else FATAL();
	}
}

static unsigned lcd_getid2(void) {
	unsigned id;

	// Manufacturer Command Access Protect
	lcm_send_cmd(0xb0);
	lcm_send_data(0x00);
	// Device Code Read
	// 0x0122xxxx: RenesasSP
	// 0x0204xxxx: Ilitek
	id = lcd_cmdret(0xbf, 5);
	return id;
}

static int is_whtled_on(void) {
	if (_chip == 1) // ANA_WHTLED_CTR
		return (adi_read(0x82001400 + 0x13c) & 1) == 0;
	else // ANA_LED_CTRL
		return (adi_read(0x82001000 + 0x320) & 4) == 0;
}

static const lcd_config_t* lcm_init(void) {
	uint32_t id, clk_rate, cs = sys_data.lcd_cs;
	const lcd_config_t *lcd;

	id = sys_data.lcd_id;
	if (id == 0x1230 || id == 0x1306) {
		DBG_LOG("LCD: id = 0x%06x\n", id);
		lcd = lcd_find_conf(id, 2);
		if (id == 0x1230) {
			lcd_reset_hx1230();
			lcd_setup.send = lcd_send_hx1230;
#if LIBC_SDIO == 0
		} else if (id == 0x1306) {
			lcd_reset_ssd1306();
			lcd_setup.send = lcd_send_ssd1306;
#endif
		}
		return lcd;
	}

	AHB_PWR_ON(0x40);	// LCM enable

	LCM_CR(0) = 0;
	LCM_CR(0x10) = 1;
	LCM_CR(0x14) = 0xa50100;

	//if (IS_SC6530 || !is_whtled_on()) lcm_reset(32, 0);

	DBG_LOG("lcm_init trace 1\n");

	clk_rate = get_ahb_freq();
	DBG_LOG("LCD: clk_rate = %u\n", clk_rate);

	if (sys_data.spi) {
		lcd = lcd_spi_init(sys_data.spi, clk_rate);
		lcd_setup.send = spi_send;
		return lcd;
	}

	lcm_set_safe_freq(cs);
	lcm_config_addr(cs);
	id = sys_data.lcd_id;
	if (!id) id = lcd_getid();
	// workaround for NT35310
	if (id == 0x8000) id = lcd_cmdret(0xd4, 4);
	// workaround for ILI9225G and SPFD5420A
	else if (!id || id == 0x040404) {
		lcm_send_cmd(0x00);
		id = lcd_cmdret(0x00, 2);
	}
	if (!id) id = lcd_cmdret(0xd3, 4) & 0xffffff; // ILI9341
	if (!id) id = lcd_getid2();
	DBG_LOG("LCD: id = 0x%06x\n", id);
	lcd = lcd_find_conf(id, 0);

	lcm_set_freq(cs, clk_rate, lcd);
	lcd_setup.send = lcm_send;
	return lcd;
}

void sys_start_refresh(void) {
	int mask = 1;	// osd == 3 ? 2 : /* osd0 */ 1
	if (sys_data.mac & 0x100) {
		if (!(sys_data.mac & 1))
			lcd_refresh_mono(sys_data.framebuf);
		return;
	}
	clean_dcache();
	if (sys_data.spi)
		spi_refresh_next(sys_data.spi);
	LCDC_CR(LCDC_IRQ_EN) |= mask;
	LCDC_CR(LCDC_CTRL) |= 8;	// start refresh
}

void sys_wait_refresh(void) {
	int mask = 1;	// osd == 3 ? 2 : /* osd0 */ 1

	if (!(LCDC_CR(LCDC_IRQ_EN) & mask)) return;

	while ((LCDC_CR(LCDC_IRQ_RAW) & mask) == 0);
	LCDC_CR(LCDC_IRQ_CLR) |= mask;
}

static void lcd_init(const lcd_config_t *lcd) {
	unsigned w = lcd->width, h = lcd->height, x2, y2, w2, h2;
	unsigned rotate, mac_arg;
	const uint8_t rtab[4] = { 0, 0xa0, 0xc0, 0x60 };

	sys_data.lcd_id = lcd->id;

	rotate = sys_data.rotate & 3;
	mac_arg = lcd->mac_arg;
	if (sys_data.mac)
		mac_arg = (mac_arg & ~0xff) | (sys_data.mac & 0xff);
	mac_arg ^= rtab[rotate];
	if (mac_arg & 0x100) mac_arg &= ~0x20;
	if (mac_arg & 0x20) {
		unsigned t = w; w = h; h = t;
	}
	x2 = 0; w2 = w - 1;
	y2 = 0; h2 = h - 1;
	// fix for ST7735
	if (lcd->id == 0x7c89f0) {
		w -= x2 = w & 3;
		h -= y2 = h & 3;
	}
	sys_data.mac = mac_arg;
	sys_data.display.w1 = w;
	sys_data.display.h1 = h;

	lcm_exec(lcd->cmd_init);
	if (lcd->id == 0x289328 || lcd->id == 0x5420 || lcd->id == 0x9226) {
		/* Why can't people use standardized commands? */
#define X(a, b) LCM_CMD(a >> 8, 0), LCM_CMD(a & 0xff, b)
		static uint8_t cmd_init2_ili9328[] = {
			// ORG, 0, I/D1, I/D0, AM, 0, 0, 0
			X(0x03, 2), 0x10,0, // Entry Mode
			X(0x50, 2), 0,0, // Horizontal Address Start Position
			X(0x51, 2), 0,0, // Horizontal Address End Position
			X(0x52, 2), 0,0, // Vertical Address Start Position
			X(0x53, 2), 0,0, // Vertical Address End Position
			X(0x20, 2), 0,0, // Horizontal GRAM Address Set
			X(0x21, 2), 0,0, // Vertical GRAM Address Set
			X(0x22, 0), // Write Data to GRAM
			LCM_END
		};
		static uint8_t cmd_init2_spfd5420a[] = {
			X(0x003, 2), 0x10,0, // Entry Mode
			X(0x210, 2), 0,0, // Horizontal Address Start Position
			X(0x211, 2), 0,0, // Horizontal Address End Position
			X(0x212, 2), 0,0, // Vertical Address Start Position
			X(0x213, 2), 0,0, // Vertical Address End Position
			X(0x200, 2), 0,0, // Horizontal GRAM Address Set
			X(0x201, 2), 0,0, // Vertical GRAM Address Set
			X(0x202, 0), // Write Data to GRAM
			LCM_END
		};
#undef X
		uint8_t *p = cmd_init2_ili9328, *p0;
		if (lcd->id == 0x5420) p = cmd_init2_spfd5420a;
		if (lcd->id == 0x9226) { // ILI9225G
			p[6 * 1 + 3] = 0x37;
			p[6 * 2 + 3] = 0x36;
			p[6 * 3 + 3] = 0x39;
			p[6 * 4 + 3] = 0x38;
		}
		p0 = p;
		mac_arg &= 0xff;
		p[5] = mac_arg >> 2; p += 6;
		if (mac_arg & 0x20) {
			unsigned t;
			t = w2; w2 = h2; h2 = t;
			t = x2; x2 = y2; x2 = t;
		}
		p[4] = x2 >> 8; p[5] = x2; p += 6;
		p[4] = w2 >> 8; p[5] = w2; p += 6;
		p[4] = y2 >> 8; p[5] = y2; p += 6;
		p[4] = h2 >> 8; p[5] = h2; p += 6;
		if (!(mac_arg & 0x40)) p[4] = w2 >> 8, p[5] = w2;
		p += 6;
		if (!(mac_arg & 0x80)) p[4] = h2 >> 8, p[5] = h2;
		lcm_exec(p0);
	} else if (sys_data.mac & 0x100) {
		void (*send_fn)(unsigned, unsigned) = lcd_setup.send;
		uint32_t timer_val = 26000000 / 75, id;
		if (sys_data.spi) FATAL();
		send_fn(0, 0xa0 | (mac_arg >> 6 & 1)); // SEG Direction (MX)
		send_fn(0, 0xc0 | (mac_arg >> 4 & 8)); // COM Direction (MY)
		send_fn(0, 0xa6 | (mac_arg >> 3 & 1)); // Inverse Display (INV)
		id = lcd->id;
		if (id == 0x7567 && (sys_data.mac & 0x10)) { // ST7567A
			send_fn(0, 0xff); // Extension Command (ON)
			send_fn(0, 0x72); // Display Setting Mode (ON)
			send_fn(0, 0xfe); // Extension Command (OFF)
			send_fn(0, 0xd0 + 4); // Set Duty (65)
			send_fn(0, 0x90 + 0); // Set Bias (1/9)
			send_fn(0, 0x98 + 6); // Set Frame Rate (300)
			send_fn(0, 0x81); // Set EV (contrast)
			send_fn(0, 0x28); // Set EV (value)
			timer_val = 26000000 / 300;
		} else if (id == 0x1306) {
			timer_val = 26000000 / 150;
		}
		if (sys_data.mac & 1) {
			if (timer_val)
				lcd_setup_timer(LCD_TIMER, timer_val);
			else sys_data.mac &= ~1;
		}
	} else {
		static uint8_t cmd_init2[] = {
			// MY, MX, MV, ML, RB, MH, 0, 0
			LCM_CMD(0x36, 1), 0, // Memory Access Control
			LCM_CMD(0x2a, 4), 0,0,0,0, // Column Address Set
			LCM_CMD(0x2b, 4), 0,0,0,0, // Page Address Set
			LCM_CMD(0x2c, 0), // Memory Write
			LCM_END
		};
		uint8_t *p = cmd_init2;
		p[2] = mac_arg; p += 3;
		p[2] = x2 >> 8; p[3] = x2;
		p[4] = w2 >> 8; p[5] = w2; p += 6;
		p[2] = y2 >> 8; p[3] = y2;
		p[4] = h2 >> 8; p[5] = h2;
		lcm_exec(cmd_init2);
	}
}

static void lcdc_init(void) {
	struct sys_display *disp = &sys_data.display;
	unsigned w = disp->w1, h = disp->h1;
	unsigned w2 = disp->w2, h2 = disp->h2;

	if (sys_data.mac & 0x100) {
		lcd_clear_mono();
		return;
	}

	AHB_PWR_ON(0x1000);	// LCDC enable
	// AHB_SOFT_RST?
	AHB_CR(_chip != 1 ? 0x20 : 0x1040) = 0x200;
	sys_wait_ms(10);
	AHB_CR(_chip != 1 ? 0x30 : 0x2040) = 0x200;

	LCDC_CR(LCDC_CTRL) |= 1; // lcdc_enable = 1

	// INT_IRQ_ENABLE
	// MEM4(0x80000000 + 8) |= 0x400000;

	LCDC_CR(LCDC_CTRL) |= 2; // fmark_mode = 1
	LCDC_CR(LCDC_CTRL) &= ~4; // fmark_pol = 0
	LCDC_CR(LCDC_BG_COLOR) = 0x000000;

	LCDC_CR(LCDC_DISP_SIZE) = w | h << 16;
	LCDC_CR(LCDC_LCM_START) = 0;
	LCDC_CR(LCDC_LCM_SIZE) = w | h << 16;

	{
		uint32_t addr, mode;
		if (!sys_data.spi) {
			lcm_set_mode(0x28); // 8x2 BE
			mode = 2; addr = lcd_setup.addr | 1 << 17;
		} else {
			spi_refresh_init(sys_data.spi);
			mode = 0; addr = sys_data.spi + SPI_TXD;
		}
		LCDC_CR(LCDC_OSD4_CTRL) |= 0x20;
		LCDC_CR(LCDC_OSD4_CTRL) |= (LCDC_CR(LCDC_OSD4_CTRL) & ~(3 << 6)) | mode << 6;
		LCDC_CR(LCDC_CTRL) &= ~(7 << 5);
		LCDC_CR(LCDC_OSD4_LCM_ADDR) = addr >> 2;
	}

	sys_start_refresh();
	sys_wait_refresh();
	LCDC_CR(LCDC_IRQ_EN) &= ~1;

	{
		uint32_t a = LCDC_CR(LCDC_OSD0_CTRL);
		int fmt = 5;
		//a |= 1;
		a &= ~2; // disable color key
		a |= 4; // block alpha
		a = (a & ~(15 << 4)) | fmt << 4; // format
		a = (a & ~(3 << 8)) | 2 << 8; // little endian
		LCDC_CR(LCDC_OSD0_CTRL) = a;
	}

	LCDC_CR(LCDC_OSD0_PITCH) = w2;

	w2 = w2 > w ? w : w2;
	h2 = h2 > h ? h : h2;
	w2 &= ~1;	// must be aligned

	//LCDC_CR(LCDC_OSD0_BASE_ADDR) = (uint32_t)base >> 2;
	LCDC_CR(LCDC_OSD0_SIZE_XY) = w2 | h2 << 16;
	LCDC_CR(LCDC_OSD0_DISP_XY) = ((w - w2) >> 1) | ((h - h2) >> 1) << 16;
}

void sys_framebuffer(void *base) {
	struct sys_display *disp = &sys_data.display;
	unsigned w = disp->w1, w2 = disp->w2;
	unsigned offset = (w2 - w) >> 1;

	if (sys_data.mac & 0x100) {
		uint32_t r, n = w * disp->h1;
		uint8_t *d = (uint8_t*)base;
		sys_data.framebuf = base;
		memset(d, 0x80, n); d += n;
		r = sys_timer_ms();
		do *d++ = (r = (r * 0x08088405) + 1) >> 25;
		while (--n);
		{
			unsigned id = sys_data.lcd_id;
			void (*fn)(uint8_t*);
			do {
				fn = lcd_refresh_st7567;
				if (id == 0x7567 || id == 0x7565) {
					lcd_refresh_st7567_init();
					break;
				}
				fn = lcd_refresh_hx1230;
				if (id == 0x1230) break;
#if LIBC_SDIO == 0
				fn = lcd_refresh_ssd1306;
				if (id == 0x1306) break;
#endif
				/* should not happen */
			} while (0);
			lcd_refresh_mono = fn;
		}
		if (sys_data.mac & 1) {
			setup_int_vectors();
			lcd_start_timer();
		}
		return;
	}

	if (w2 < w) offset = 0;

	LCDC_CR(LCDC_OSD0_BASE_ADDR) = ((uint32_t)base + offset * 2) >> 2;
	LCDC_CR(LCDC_OSD0_CTRL) |= 1;
}

int keypad_read_pb(void) {
	uint32_t val, addr = 0x82001200, ch = 1;
	if (_chip != 1) addr = 0x82001900, ch = 3;
	// EIC_DBNC_DMSK
	adi_write(addr + 4, adi_read(addr + 4) | 1 << ch);
	// EIC_DBNC_DATA
	val = adi_read(addr) >> ch & 1;
	// inverted on SC6531DA
	if (_chip == 2) val ^= 1;
	return val;
}

static void eic_enable(void) {
	// EIC_A
	if (_chip == 1) {
		adi_write(0x82001410, adi_read(0x82001410) | 8);
		adi_write(0x82001408, adi_read(0x82001408) | 8);
	} else {
		adi_write(0x820010e4, 0x20);
		adi_write(0x820010e0, 0x80);
	}
	// EIC_D, not really needed
	//APB_PWR_ON(0x4000000);
	//APB_PWR_ON(0x2000000);
}

static void keypad_init(void) {
	keypad_base_t *kpd = KEYPAD_BASE;
	short *keymap = sys_data.keymap_addr;
	int i, j, row = 0, col = 0, ctrl;
	int nrow = sys_data.keyrows;
	int ncol = sys_data.keycols;

	for (i = 0; i < ncol; i++)
	for (j = 0; j < nrow; j++)
		if (keymap[i * nrow + j] != -1)
			col |= 1 << i, row |= 1 << j;

	if (_chip != 1)
		row &= 0xfc, col &= 0xfc;	// why?

	//DBG_LOG("keypad: row_mask = 0x%02x, col_mask = 0x%02x\n", row, col);

	APB_PWR_ON(0x80040);

	kpd->int_clr = 0xfff;
	kpd->clk_divide = 1;
	kpd->debounce = 16;
	kpd->int_en = 0xfff;
	kpd->polarity = 0xffff;

	ctrl = kpd->ctrl;
	//DBG_LOG("keypad: ctrl = %08x\n", ctrl);
	ctrl |= 1; // enable
	ctrl &= ~2; // sleep
	ctrl |= 4; // long
	ctrl &= _chip == 1 ? ~0xffff00 : ~0xfcfc00;
	ctrl |=	row << 16 | col << 8;
	kpd->ctrl = ctrl;

	// Required to check the status of the power button.
	eic_enable();
}

int sys_event(int *rkey) {
	static int static_i = 0;
	static uint32_t static_ev, static_st;
	static uint8_t pb_saved[8] = { 0 };
	uint32_t event, status;
	int i = static_i;
	uint16_t *keytrn;

	if (!sys_data.keymap_addr) return EVENT_END;
	event = static_ev;
	status = static_st;
	if (!i) {
		keypad_base_t *kpd = KEYPAD_BASE;
		event = kpd->int_raw;
		status = kpd->key_status;
		event &= 0xff;
		if (!event) return EVENT_END;
		kpd->int_clr = 0xfff;
		if (status & 8) return EVENT_END;
		event = (event & 0xfff) | keypad_read_pb() << 12;
		static_ev = event;
		static_st = status;
	}

	for (; i < 8; i++) {
		if (event >> i & 1) {
			uint32_t k = status >> ((i & 3) * 8);
			keytrn = sys_data.keytrn[0];
			k = (k & 0x70) >> 1 | (k & 7);
			if (i < 4) {
				if (event >> 12)
					pb_saved[k >> 3] |= 1 << (k & 7), keytrn += 64;
			} else {
				uint8_t *p = &pb_saved[k >> 3];
				unsigned a = *p, b = 1 << (k & 7);
				if (a & b) *p = a ^ b, keytrn += 64;
			}
			k = keytrn[k];
			if (k) {
				*rkey = k;
				static_i = i + 1;
				return i < 4 ? EVENT_KEYDOWN : EVENT_KEYUP;
			}
		}
	}
	static_i = 0;
	return EVENT_END;
}

static void init_charger(void) {
	// ANA_CHGR_CTRL0
	unsigned ctrl0 = 0x82001400 + 0x150;
	if (_chip != 1) ctrl0 = 0x82001000 + 0x200;
	// will allow to remove the battery after boot
	if (_chip != 1 && !IS_SC6530 && sys_data.charge >= 2) {
		// CHGR_CTRL0:CHGR_CC_EN = 1
		adi_write(ctrl0, adi_read(ctrl0) | 1);
		// CHGR_CTRL0:CHGR_CC_I = 300mA
		adi_write(ctrl0, (adi_read(ctrl0) & ~(0xf << 4)) | 0 << 4);
		// CHGR_CTRL0:CHGR_PD = 1
		adi_write(ctrl0, adi_read(ctrl0) | 1 << 8);
		sys_wait_ms(10);
		// CHGR_CTRL0:CHGR_PD = 0
		adi_write(ctrl0, adi_read(ctrl0) & ~(1 << 8));
		// CHGR_CTRL0:RECHG = 1
		adi_write(ctrl0, adi_read(ctrl0) | 1 << 12);
	} else if (sys_data.charge >= 0) {
		unsigned charger_pd = sys_data.charge < 1;
		unsigned sh = _chip == 1 ? 0 : 8;	// CHGR_PD
		uint32_t val = adi_read(ctrl0) & ~(1 << sh);
		adi_write(ctrl0, val | charger_pd << sh);
	}
}

void sys_init(void) {
	init_charger();
	init_chip_id();
	//for (;;) {	// uncomment to test timer
	//	DBG_LOG("time: %u ms\n", sys_timer_ms());
	//	sys_wait_ms(50);
	//}
	pin_init();
	lcd_init(lcm_init());
	lcd_appinit();
	lcdc_init();
	if (sys_data.keymap_addr) {
		keypad_init();
		keytrn_init();
	}
	sys_data.init_done = 1;
}

void sys_start(void) {
	sys_brightness(sys_data.brightness);
	if (sys_data.keymap_addr)
		KEYPAD_BASE->int_clr = 0xfff;
}

void sys_exit(void) {
	if (sys_data.init_done) {
		sys_brightness(0);
		LCDC_CR(LCDC_CTRL) &= ~1;
		AHB_PWR_OFF(0x1000 | 0x40); // LCDC, LCM
		set_cpsr_c(0xdf); // mask interrupts
	}
	sys_wdg_reset(SYS_RESET_DELAY); // 0.5 sec
}

void sys_wdg_reset(unsigned val) {
	uint32_t wdg;
	// watchdog enable
	if (_chip == 1) {
		adi_write(0x82001408, adi_read(0x82001408) | 4);
		adi_write(0x82001410, adi_read(0x82001410) | 4);
		wdg = 0x82001040;
	} else {
		adi_write(0x820010e0, 4);
		adi_write(0x820010e4, 2);
		wdg = 0x82001480;
	}
	// set reset timer
	adi_write(wdg + 0x20, 0xe551); // LOCK
	adi_write(wdg + 8, adi_read(wdg + 8) | 9); // CTRL
	// 1 / 32768
	adi_write(wdg + 0, val & 0xffff); // LOAD_LOW
	adi_write(wdg + 4, val >> 16); // LOAD_HIGH
	adi_write(wdg + 8, adi_read(wdg + 8) | 2);
	adi_write(wdg + 0x20, ~0xe551);
	for (;;);
}

and init_sc6530.h
#ifdef SMC_INIT_BUF
extern int sc6530_init_smc_asm[1];
extern int sc6530_init_smc_asm_end[1];
static void sc6530_init_smc(void) {
// must be run from on-chip RAM
	int *p = sc6530_init_smc_asm;
	int n = sc6530_init_smc_asm_end - p;
	int *d = (int*)SMC_INIT_BUF, *f = d;
	do *d++ = *p++; while (--n);
	((void(*)(void))(intptr_t)f)();
}
#else
static void sc6530_init_smc(void) {
	uint32_t base = 0x20000000, ps;

	ps = MEM_REMAP;
	ps = ps << 29 | ps << 28 | 0x04000000;

	MEM4(base + 0x00) = 0x22220000;
	MEM4(base + 0x04) = 0;
	MEM4(base + 0x20) = 0;
	MEM4(base + 0x24) = 0x00924ff0;
	MEM4(base + 0x28) = 0x0151ffff;
	MEM4(base + 0x2c) = 0x00a0744f;
	DELAY(100)
	MEM4(base + 0x00) = 0x222211e0;
	MEM4(base + 0x04) = 0x8080;
	DELAY(10)
	MEM4(base + 0x24) |= 0x20000;
	MEM2(ps + 0x10323e) = 0;
	MEM2(ps + 0x20) = 0;
	DELAY(10)
	MEM4(base + 0x24) &= ~0x20000;
	DELAY(10)
	MEM4(base + 0x24) = 0x00ac1fff;
	MEM4(base + 0x28) = 0x015115ff;
	MEM4(base + 0x2c) = 0x00501015;
	MEM4(base + 0x00) = 0x222210e0;
	MEM4(base + 0x04) = 0x8080;
	DELAY(100)
}
#endif

static void sc6530_init_freq(void) {
	uint32_t a;
#if 1 // what's this?
	MEM4(0x8b0000a0) = -2;
	MEM4(0x8b0000a8) = -2;
#endif
	// CPU freq
	a = MEM4(0x8b000040);
	MEM4(0x8b000040) = a |= 4;
	MEM4(0x8b000040) = (a & ~3) | 1;	// 208 MHz
	DELAY(100)
}

static void sc6530_init_adi(void) {
	MEM4(0x8b0000a0) = 1 << 24; // ADI enable
	// ADI reset
	MEM4(0x8b000060) = 1 << 19;
	DELAY(100)
	MEM4(0x8b000064) = 1 << 19;
	// init analog
	MEM4(0x82000000) &= ~(1 << 4);
	MEM4(0x82000004) = 0x55000;
}

static void init_sc6530(void) {
	sc6530_init_freq();
	sc6530_init_smc();
	sc6530_init_adi();
}

also can you walk me through using the SD card? (using fpmenu)
idk how to compile all the games using LIBC_SDIO=3

Actually have no idea! here is the whole code:

Please don't post all thousand lines of code, that's what git diff is for.
If the old binaries now work for you, then the problem and its solution have nothing to do with these changes.

no the old ones don't work the ones compiled with the code I sent u do work

Here is a script that will recompile all the binaries (will be in the fpdoom/release directory):
#!/bin/bash
NDK=$HOME/android-ndk-r26d
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm
CLANG=$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang

cd fpdoom && {
	test -f pack_reloc/pack_reloc || make -C pack_reloc
	make -f release.make clean all ZIPDIR=../zipdir TOOLCHAIN=$TOOLCHAIN CC=$CLANG 2>&1 | tee ../build-release.log
}

A zipdir directory will be created, into which all the necessary game sources will be downloaded.

I'm goin to school but I don't have much today so I'll be back around 3 hours later
if there is anything I have to do to make the sdcard boot working tell me

if there is anything I have to do to make the sdcard boot working tell me

Use the script from this comment to rebuild all binaries.
Read sdboot/README.md.
Find a microSD card up to 32GB, it must be formatted in FAT32, some new cards come formatted in exFAT.
Write the fpbin directory from releases/sdcard to the card.
Write games/doom1/doom1.wad to the card, then Doom will work from the menu. You will understand about other games if you read fpbin/config.txt.
To check, insert the card into the phone and run via USB:
./spd_dump fdl sdboot3.bin 0x40004000
How to patch the firmware is written in sdboot/README.md.

games/doom/doom1.wad

Should be "games/doom1/doom1.wad".
The directory name is specified in fpbin/config.txt.
|Doom 1| $doom --dir games/doom1 doom # -timedemo demo1

I just used the fphelper sdboot guide but now I how do I boot into the sd card instead of the normal OS?

it works now but the nes emulator keeps crashing... I'll see what I can do and if I can't figure out the problem I'll post here

I got it working now (another path issue)
quick question, what are your future ports for this repo?

I'm porting Snes9x now.

You can examine the fptest code to see how display and keypad access works.
Try to minimize the changes required to the B310E. Remove all changes (make a backup of the current fpdoom folder and make a new one without changes) and try the fixes below separately. Are both really needed or just one?
fpdoom/init_sc6530.h:
 static void sc6530_init_freq(void) {
 	uint32_t a;
-#if 0 // what's this?
+#if 1 // what's this?
 	MEM4(0x8b0000a0) = -2;
 	MEM4(0x8b0000a8) = -2;
 #endif

fpdoom/syscode.c:
 		} else if (addr >> 12 == 0x8c000) {
-			if (addr == sc6530_fix) continue;
+			if (addr == 0x8c0002a4) continue;
 			if (_chip == 1 && addr - 0x8c000114 <= 0x18) {

trying...

happy news! the syscode.c one worked prefectly!!!
while the init_sc6530.h did nothing

Maybe it happens because UART is enabled when its pin is reconfigured.
Also try this pin_init() that disables UART.
static void pin_init(void) {
	const volatile uint32_t *pinmap = pinmap_addr;
	uint32_t sc6530_fix = 0;
	if (IS_SC6530) {
		sc6530_fix = 0x8c000290; // SPI0 pin
		MEM4(0x8b0000a4) = 0xc00; // disable UART
	}

	for (;;) {
		uint32_t addr = pinmap[0], val = pinmap[1];
		pinmap += 2;
		if (addr - 0x82001000 < 0x1000) {
			adi_write(addr, val & 0xffff);
		} else if (addr >> 12 == 0x8c000) {
			if (addr == sc6530_fix) continue;
			if (_chip == 1 && addr - 0x8c000114 <= 0x18) {
				// ANA_LDO_SF_REG0
				if (adi_read(0x8200148c) & 1 << 9)
					val |= 0x200000;
				else if (sys_data.chip_id.ver == 0xa0001)
					val |= 0x280000;
			}
			MEM4(addr) = val;
		} else break;
	}
	if (sys_data.gpio_init)
		gpio_init((void*)pinmap);
}

Please also try the second one as it will be a better solution.

the second one also works perfectly!

I committed the second one with comments: https://github.com/ilyakurdyukov/fpdoom/commit/e143a40c4b3f2c35524c7aad0f244c2c97fdbf03

any plans for sound driver?

any plans for sound driver?

It will be very difficult, I'm not ready for it.
I published a Snes9x port, you can try it.
fpmenu/config.txt is updated with example. But fix the typo nes_args -> snes_args.
-$snes = fpbin/snes9x.bin $@ --scaler 49 $nes_args
-$snes16 = fpbin/snes9x_16bit.bin $@ --scaler 49 $nes_args
+$snes = fpbin/snes9x.bin $@ --scaler 49 $snes_args
+$snes16 = fpbin/snes9x_16bit.bin $@ --scaler 49 $snes_args

I'm trying it...

it just freezes when I try opening from fpmenu
config.txt:
# This is a config file for running binaries from the FPDoom project from an SD card.

# Comments begin with a hash sign.
# The first non-empty line specifies the arguments to run the flat binary named "fpbin/fpmain.bin":

--bright 50 --charge 2

# If the "fpmenu" is located in this path, it will read the config file further.

# Variables must begin with a dollar sign.
# You can wrap long lines using blackslash.
# First arguments are stored in the $@ variable.
# You can define and redefine variables:

$@ = $@ --rotate 3

$nes_args = --dir games/nes infones
# "--scaler 49" means auto resolution + widescreen scaler
$nes = fpbin/infones.bin $@ --scaler 49 $nes_args
# Workaround for some games to display correctly.
$nes2 = $nes --scanline_step 113
# This crops the top and bottom tiles, there is garbage in some games.
$nes_crop = fpbin/infones.bin $@ --scaler 149 $nes_args

$snes_args = --dir games/snes snes9x
$snes = fpbin/snes9x.bin $@ --scaler 49 $snes_args
$snes16 = fpbin/snes9x_16bit.bin $@ --scaler 49 $snes_args

$doom = fpbin/fpdoom.bin $@

# Menu items are defined using this pattern:
# |Name| path/to/app.bin arg1 arg2 arg3

|=== PORTS ==|
|Doom 1| $doom --dir games/doom1 doom # -timedemo demo1

#1234567890123456# 128px = 16 chars
#12345678901234567890# 160px = 20 chars
#123456789012345678901234567890# 240px = 30 chars

|=== SNES ==|
|Mario World| $snes "smw.smc"

|=== NES ===|
|Mario| $nes "smb.nes"
|Bad Apple| $nes "bad_apple.nes"

I got a .sfc rom and renamed it to .smc if that matters

I just got an smc rom and corrected all the typos and it's still not working

I got a .sfc rom and renamed it to .smc if that matters

The file extension doesn't matter. Try running from USB mode to see the log.
#!/bin/bash

run_game() {
	./spd_dump \
		fdl nor_fdl1.bin 0x40004000 \
		fdl $app.bin ram
	test $? = 0 && cd workdir && {
		../libc_server -- "$@"
		cd ..
	}
}

app="snes9x"

run_game --bright 50 --rotate 3 --charge 2 --scaler 149 $app smw.smc

malloc heap: 3831076 bytes
keymap = 0x300cf154
pinmap = 0x300cf1d4
scan_firmware: 460ms
chip_id: num = 0x6530c000
chip_id: ver = 0x90001
chip_id: adi = 0x1130c000
connection closed

it just crashes

doom works
where do I put that code?

it's already in syscode.h so probably the emulator itself is crashing

doom works

Did you rebuild it with the latest sources? Because at the moment of Snes9x stop, there is no difference between Snes9x and Doom, it is an early stage of initialization.

it's already in syscode.c so probably the emulator itself is crashing

The emulator code didn't even start executing.

I'm using the latest fpdoom sources with snes9x

malloc heap: 3831076 bytes
keymap = 0x300cf154
pinmap = 0x300cf1d4
scan_firmware: 460ms
chip_id: num = 0x6530c000
chip_id: ver = 0x90001
chip_id: adi = 0x1130c000
connection closed

But still, at this stage the application code doesn't even start, so it's strange that Doom works, but Snes9x disconnects (at the same point as before with Doom).

I patched pin_init() to the second option, you can try switching to the first again.

can you give me a working rom of bad apple or anything else?

Try the 2048 homebrew, download is at the bottom of this page.
"2048" [checksum ok] LoROM, 2Mbits, Type: ROM+RAM+BAT, Mode: 20, TV: NTSC, S-RAM: 2KB, ROMId: SNES Company: 00 CRC32: E155D6F4

now this happens
!!! entry2
!!! init_rommap(rom_fn) failed
!!! exit(1)
connection closed

You run this and have a workdir/2048.sfc file? Please double check the file name and extension.
run_game --bright 50 --rotate 3 --charge 2 --scaler 149 $app 2048.sfc

I discovered that I was using smw.sfc this whole time
but even changing to 2048.sfc just gave me the corrupt rom error

Disable this line in snes9x/Makefile and rebuild the binaries:
-CFLAGS += -DAPP_MEM_RESERVE -DAPP_DATA_EXCEPT
+#CFLAGS += -DAPP_MEM_RESERVE -DAPP_DATA_EXCEPT

Then you won't be able to load ROMs larger than 2MB (16Mbit), but the virtual memory manager won't be used. But on my B310E it works.

2048 is working perfectly now!

super mario world is glitched to hell!

super mario world is glitched to hell!

You need to use snes_16bit binary.

compiling with USE_16BIT=1 and mario is still glitched but even without 16bit it's 100% playable

It seems like Snes9x tried to fix Mario in 8-bit mode, where it works almost without glitches. I tried to fix Zelda, which is unplayable when it's raining in the game. By fixing Zelda, I partially broke Mario. I'll fix it so that both work.
I don't know what glitches you're talking about in 16-bit mode. Maybe something else breaks with your phone as well.
What's wrong with these Samsung phones, are they using early buggy chips? I bought a recently manufactured B310E, maybe it is different.
Add this code to fptest/main.c to identify the ARM core:
 	if (1) {
 		printf("argc = %i\n", argc);
 		for (i = 0; i < argc; i++)
 			printf("[%i] = %s\n", i, argv[i]);
 	}

+	if (1) {
+		uint32_t id0, id1;
+		__asm__ __volatile__(
+#ifdef __thumb__
+			".p2align 2\nbx pc\n.p2align 2\n.code 32\n"
+#endif
+			"mrc p15, #0, %0, c0, c0, #0\n"
+			"mrc p15, #0, %1, c0, c0, #1\n"
+#ifdef __thumb__
+			"blx 1f\n.code 16\n1:\n"
+#endif
+			: "=r"(id0), "=r"(id1) :: "lr");
+		printf("ARM: id = 0x%08x, cache = 0x%08x\n", id0, id1);
+	}

Should be id = 0x41069265, cache = 0x1d152152 for SC6530C.


Fix enhancement typo

"enhancment" -> "enhancement"

Codecov Report

Merging #2593 (62f6771) into develop (63107d6) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #2593      +/-   ##
===========================================
- Coverage    95.41%   95.36%   -0.05%
===========================================
  Files           59       59
  Lines        11623    11832     +209
===========================================
+ Hits         11090    11284     +194
- Misses         533      548      +15

Impacted Files
Coverage Δ

botocore/compat.py
72.13% <0.00%> (-1.10%)
:arrow_down:

botocore/httpsession.py
90.21% <0.00%> (-0.43%)
:arrow_down:

botocore/utils.py
95.40% <0.00%> (-0.35%)
:arrow_down:

botocore/credentials.py
98.56% <0.00%> (-0.10%)
:arrow_down:

botocore/args.py
100.00% <0.00%> (ø)

botocore/config.py
100.00% <0.00%> (ø)

botocore/exceptions.py
99.53% <0.00%> (+<0.01%)
:arrow_up:

botocore/session.py
96.87% <0.00%> (+0.25%)
:arrow_up:

botocore/configprovider.py
94.44% <0.00%> (+0.98%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 63107d6...62f6771. Read the comment docs.


Fix: Docs not updating

What?
Fix autodocs not updating on website
Closes https://github.com/instadeepai/Mava/issues/694
Why?
Docs need to be accessable to users on [https://id-mava.readthedocs.io/en/latest/systems/general/]https://id-mava.readthedocs.io/en/latest/systems/general/
How?
Updated JAX logo path to correct branch
Extra
Fix JAX Logo path

@RuanJohn fixed this by updating read the docs settings. Will close when verified that r=the website updates

Thanks, @OmaymaMahjoub @RuanJohn
Website updated


Corrected erroneous description of execution parameters

Very minor correction. Unnecessary single-byte spaces were included between the parameter identifier and the parameter name.

Before

python eval.py \
   -- gpus 1 (If no GPU is available, set -1) \

After

python eval.py \
   --gpus 1 (If no GPU is available, set -1)

Thank you so much!


If group has no items to display upon app startup, leftPanel references not-yet-existing div

Function _createNoDataContainer in leftPanel.js references query(".esriCTInnerRightPanel") twice for a domClass.replace and once to get the container for a no-results-text message. When a group has no items display upon app startup, the gallery has not yet been started, so the div with class esriCTInnerRightPanel doesn't yet exist and query(".esriCTInnerRightPanel") returns an empty list.
The beginning of the function checks for this empty list before using the first element of the list
if (query(".esriCTInnerRightPanel")[0]) {
    domClass.replace(query(".esriCTInnerRightPanel")[0], "displayNoneAll", "displayBlockAll");
}

but the second access does not, which causes a failure in the program at this point
if (domClass.contains(query(".esriCTInnerRightPanel")[0], "displayNone")) {
    domClass.replace(query(".esriCTNoResults")[0], "displayNoneAll", "displayBlockAll");
} else {
    domClass.replace(query(".esriCTNoResults")[0], "displayBlockAll", "displayNoneAll");
}
topic.publish("hideProgressIndicator");

The effects of this failure appear to be

the div containing the message "No results found" is created but not placed into the page
the "hideProgressIndicator" message is not published to hide the loading indicator (but this message is published elsewhere after the popup alert box is displayed, so this publication appears to not be needed)

Console error message:
TypeError: Cannot read property 'className' of null
    at Object.m.contains (http://js.arcgis.com/3.15/init.js:223:460)
    at declare._createNoDataContainer

@allisonmuise,
We are able to reproduce the issue. This is because of the function is trying to access the elements which are not created yet. This is  a low LOE and low risk fix. We can provide the fix in next week.
-Varsha

@CTLocalGovTeam
Varsha, that's great. Thanks!

Looks good; thanks!


[Improvement][plugin] decommission connection pool in kyuubi

Purpose of the pull request
close #14189

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

(or)
If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@caishunfeng @SbloodyS plz help review

Codecov Report

Merging #14190 (8b3d7a3) into dev (4c2e57c) will increase coverage by 0.23%.
The diff coverage is 31.03%.

:exclamation: Current head 8b3d7a3 differs from pull request most recent head bf81161. Consider uploading reports for the commit bf81161 to get more accurate results

@@             Coverage Diff              @@
##                dev   #14190      +/-   ##
============================================
+ Coverage     38.24%   38.47%   +0.23%
- Complexity     4465     4556      +91
============================================
  Files          1228     1237       +9
  Lines         42885    43503     +618
  Branches       4761     4783      +22
============================================
+ Hits          16401    16738     +337
- Misses        24676    24912     +236
- Partials       1808     1853      +45

Impacted Files
Coverage Δ

...hinscheduler/plugin/alert/script/ScriptSender.java
70.58% <ø> (-1.64%)
:arrow_down:

...uler/api/controller/ProcessInstanceController.java
65.30% <0.00%> (-4.26%)
:arrow_down:

...low/instance/pause/pause/PauseExecuteFunction.java
0.00% <0.00%> (ø)

...or/workflow/instance/stop/StopExecuteFunction.java
0.00% <0.00%> (ø)

...che/dolphinscheduler/api/python/PythonGateway.java
16.94% <0.00%> (ø)

...er/api/service/impl/MetricsCleanUpServiceImpl.java
12.50% <0.00%> (-1.79%)
:arrow_down:

...api/service/impl/TaskDefinitionLogServiceImpl.java
7.69% <0.00%> (ø)

...uler/api/service/impl/TaskInstanceServiceImpl.java
51.79% <0.00%> (ø)

...cheduler/common/constants/CommandKeyConstants.java
0.00% <ø> (ø)

...e/dolphinscheduler/common/constants/Constants.java
75.00% <ø> (ø)

... and 131 more

... and 26 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@caishunfeng @SbloodyS  plz review

@caishunfeng @SbloodyS Is there anything that need to improve ? Thanks.

Please check failed CI.

looks like the CI failed due to zookeeper connect timeout


Add CII Best Practices

Is your feature proposal related to a problem? Please describe.
Have not connected CII Best Practices
Describe the solution you'd like to implement
Add CII Best Practices
Describe alternatives you've considered
NA
Additional context
NA

Closed by #24


Feature: Support naming nested objects in show()

It's possible to send multiple objects to show(obj1, obj2) but what's really nice is that you can send nested objects as well, i.e.:
show(main_object, parts_list) and they show up hierarchically in the OCP Cad Viewer. In this case the top level objects can be named as documented:
show(main_object, parts_list, names=["Main", "Parts"])

but it doesn't seem possible to name the nested objects in the parts_list. I would like to request that this be supported, perhaps with syntax like:
show(main_object, parts_list, names=["Main", {"Parts": ["Widget A", "Widget B", ...]})

Try
b = Box(1, 1, 1)
s = [Pos(2 * i, 0, 0) * Sphere(0.2)  for i in range(10)]

for i in range(10):
    s[i].label = f"sphere_{i}"

show(b,s, names=["b", "s"])

Now I'm just making sure to label all the objects and don't need to use the name parameter at all!


Fix CODE_OF_CONDUCT

PROBLEMS

bad directory for CODE_OF_CONDUCT , ./guthub/CODE_OF_CONDUCT
file extension not added .md
very bad CODE_OF_CONDUCT
CODE_OF_CONDUCT is not for security issues, its for community guidelines

CHANGES

Change the location from .github/CODE_OF_CONDUCT to /CODE_OF_CONDUCT.md
Add File extension .md
Change the content of CODE_OF_CONDUCT to contributor-covenant 2.1

Here's the link for contributor-covenant home page

Here's the updated .md file

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
  community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
  any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
  without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
(Twiter X)[https://twitter.com/thdxr] or (BuleSky)[https://bsky.app/]
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

appreciate the desire to have something like this but i am not interested in generic code of conducts copied from project to project - they are pretty meaningless
it also removes the exact situation that actually will come up and cause problems - i would suggest next time to not be presumptuous with stuff like this, submitting this with "very bad code of conduct" isn't helping anything

Ok, 👍✌

anyways you can add .md at end of the file, so github can recognize as markdown 👈


Writer.write(): Raise correct ProtocolError on empty write and consistently returns count of rows written

Discovered these issues while working through a new PNG generator script. My row data object was unintentionally empty and failed correctly, but with the wrong error:
               File "test_png.py", line 399, in test_write_empty
                w.write(o, empty)
                UnboundLocalError: local variable 'i' referenced before assignment

The first commit contains a new test reproducing the error and failing the tests.
The following two commits fix and test for the correct ProtocolError raise.
The final commit resolves a related inconsistency.

Codecov Report

Merging #108 into main will increase coverage by 0.01%.
The diff coverage is 96.00%.

@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   94.67%   94.68%   +0.01%
==========================================
  Files           3        3
  Lines        1577     1600      +23
==========================================
+ Hits         1493     1515      +22
- Misses         84       85       +1

Impacted Files
Coverage Δ

code/test_png.py
97.91% <95.23%> (-0.09%)
:arrow_down:

code/png.py
94.22% <100.00%> (+0.01%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24d22f3...6d8ccb9. Read the comment docs.

good work! thanks for that :)


oxipng: init at 1.0.0

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

@GrahamcOfBorg build oxipng

Success on x86_64-linux (full log)
Partial log (click to expand)
cp: -r not specified; omitting directory 'target/release/native'
cp: -r not specified; omitting directory 'target/release/examples'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/wgpkhz6g5hxv6nna7bsfifq33m5hnbyb-oxipng-1.0.0
shrinking /nix/store/wgpkhz6g5hxv6nna7bsfifq33m5hnbyb-oxipng-1.0.0/bin/oxipng
strip is /nix/store/5qj61lcvzlap87rf6blvf8p577d482bv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/wgpkhz6g5hxv6nna7bsfifq33m5hnbyb-oxipng-1.0.0/bin
patching script interpreter paths in /nix/store/wgpkhz6g5hxv6nna7bsfifq33m5hnbyb-oxipng-1.0.0
checking for references to /tmp/nix-build-oxipng-1.0.0.drv-0 in /nix/store/wgpkhz6g5hxv6nna7bsfifq33m5hnbyb-oxipng-1.0.0...
/nix/store/wgpkhz6g5hxv6nna7bsfifq33m5hnbyb-oxipng-1.0.0

Success on x86_64-darwin (full log)
Partial log (click to expand)
cp: -r not specified; omitting directory 'target/release/build'
cp: -r not specified; omitting directory 'target/release/deps'
cp: -r not specified; omitting directory 'target/release/examples'
cp: -r not specified; omitting directory 'target/release/incremental'
cp: -r not specified; omitting directory 'target/release/native'
post-installation fixup
strip is /nix/store/5a88zk3jgimdmzg8rfhvm93kxib3njf9-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/7j0wv3a7ipn9iq20ykmcb33k82d21s0f-oxipng-1.0.0/bin
patching script interpreter paths in /nix/store/7j0wv3a7ipn9iq20ykmcb33k82d21s0f-oxipng-1.0.0
/nix/store/7j0wv3a7ipn9iq20ykmcb33k82d21s0f-oxipng-1.0.0

Failure on aarch64-linux (full log)
Partial log (click to expand)
cannot build derivation '/nix/store/0jribyf3qxfdl60lgpqgnfali7ai95ib-rust_serde_derive-1.0.18.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/kyglwvsprq1in2xnjg6mx9rnccidmy6f-rust_crates-io-0.11.0.drv': 30 dependencies couldn't be built
cannot build derivation '/nix/store/49yfi2522frhdq6i8hms6hjndqhv6sik-rust_docopt-0.8.1.drv': 19 dependencies couldn't be built
cannot build derivation '/nix/store/x3nxrrggzq7znif7b32kb3a7f1rz4a49-rust_git2-curl-0.7.0.drv': 20 dependencies couldn't be built
cannot build derivation '/nix/store/nzrc7j57fzrya5qyl7vqnr1rqhjg40g4-rust_ignore-0.2.2.drv': 18 dependencies couldn't be built
cannot build derivation '/nix/store/m9aq2m4jb4whd51c8jcrhvgp6igwdjqz-rust_cargo-0.22.0.drv': 78 dependencies couldn't be built
cannot build derivation '/nix/store/ir9aw7rf74r0qyxj79wbn3609prgr23c-rust_cargo-vendor-0.1.13.drv': 79 dependencies couldn't be built
cannot build derivation '/nix/store/cgda3y846835dwral0vg11qa38wdh26w-oxipng-1.0.0-vendor.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/6bqirdsd3l6ii9jhbk3s9mgp99bi86zx-oxipng-1.0.0.drv': 3 dependencies couldn't be built
error: build of '/nix/store/6bqirdsd3l6ii9jhbk3s9mgp99bi86zx-oxipng-1.0.0.drv' failed


[Dev Docs] Add command line build instructions.

Summary of the Pull Request
What is this about?
PR Checklist

[x] Applies to #8669
[x] CLA signed. If not, go over here and sign the CLA
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.

Info on Pull Request
What does this include?
Adds the command line instructions for building PowerToys
Validation Steps Performed
How does someone test & validate?
Follow these instructions and build

Closing as won't fix


🐈 Upgrade JS dependencies.

Upgrades JS dependencies, addressing security alerts.
Holding off on upgrading i18next for now; there are some breaking changes in v21 that don't (currently) play nicely with our auto-generated translation file. This may not be a problem in production, but will make it more difficult to track changes in translation strings going forward.

@davisagli I can't see the Dependabot security alerts (even on the OddBird fork with them enabled), but I think this should resolve the ones I'm aware of.


Provide option to create using azcli

[Enter feedback here]

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: bc6ecf6b-ca50-b2b0-144b-2aefca4744a7
Version Independent ID: a4bd7edb-795f-b621-b575-a5aa5bd5f65b
Content: Create an empty lake database - Azure Synapse Analytics
Content Source: articles/synapse-analytics/database-designer/create-empty-lake-database.md
Service: synapse-analytics
Sub-service: database-editor
GitHub Login: @aamerril
Microsoft Alias: aamerril

Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .

We have assigned the issue to the content author . They will evaluate & update the document as appropriate

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close


TimeSensor does not trigger

We are trying to kick off our pipeline by a TimeSensor, but it does not trigger. There is no error in the logs visible - the graph looks like this:

And the code like this:

from airflow import DAG
from airflow.operators import DummyOperator, MySqlOperator, BashOperator
from datetime import datetime, time, timedelta
from airflow.models import Variable
from airflow.operators.sensors import TimeSensor
from airflow.operators.sensors import SqlSensor

default_args = {
    'owner': 'deploy',
    'depends_on_past': False,
    'start_date': datetime(2015,06,24),
    'queue': 'default',
}

# the DAG
dag = DAG('pvi', default_args=default_args)

# tables
app_installs = SqlSensor(conn_id="exasol", sql="""SELECT MAX(CREATED_TS) FROM PVI.APP_INSTALLS WHERE CREATED_DATE='{{ ds }}'""", task_id='table_app_installs', dag=dag)
app_logins = SqlSensor(conn_id="exasol", sql="""SELECT MAX(CREATED_TS) FROM PVI.APP_LOGINS WHERE CREATED_DATE='{{ ds }}'""", task_id='table_app_logins', dag=dag)

# time dependencies
midnight_sensor = TimeSensor(target_time=time(15, 28), task_id='midnight', dag=dag)
start_aggregation = DummyOperator(task_id='start_aggregation', dag=dag)
start_aggregation.set_upstream(midnight_sensor)
start_aggregation.set_downstream([app_logins, app_installs])

We tried to trigger the chain by putting the target_time onto something 5 minutes in the future, the DAG gets refreshed every 60 seconds (default) but nothing happens. Worker, Scheduler, Flower and Webserver are on the same machine running Python 2.7 and FreeBSD 9.3 and we have a second machine running a celery worker which is listening on a different queue (q2). We have another DAG that works as expected on q2.

Hi Tobias,
What is the output of airflow test pvi midnight_sensor 2015-06-24 ?
You can usually see what the sensor does returned to stdout that way.
Best,
Arthur

2015-06-24 16:48:20,515 - root - INFO - Filling up the DagBag from /home/deploy/bit.flow/dags
2015-06-24 16:48:20,516 - root - INFO - Importing /home/deploy/bit.flow/dags/dev.py
2015-06-24 16:48:20,881 - root - INFO - Loaded DAG <DAG: dev>
2015-06-24 16:48:20,881 - root - INFO - Importing /home/deploy/bit.flow/dags/email_reporting.py
2015-06-24 16:48:20,900 - root - INFO - Loaded DAG <DAG: email_reporting>
2015-06-24 16:48:20,900 - root - INFO - Importing /home/deploy/bit.flow/dags/pvi.py
2015-06-24 16:48:20,938 - root - INFO - Loaded DAG <DAG: pvi>
2015-06-24 16:48:20,938 - root - INFO - Importing /home/deploy/bit.flow/dags/tasks.py
2015-06-24 16:48:21,034 - root - INFO - Loaded DAG <DAG: tasks>
2015-06-24 16:48:21,048 - root - INFO -
--------------------------------------------------------------------------------
New run starting @2015-06-24T16:48:21.047843
--------------------------------------------------------------------------------
2015-06-24 16:48:21,048 - root - INFO - Executing <Task(TimeSensor): midnight> for 2015-06-24 00:00:00
2015-06-24 16:48:21,049 - root - INFO - Checking if the time (15:28:00) has come
2015-06-24 16:48:21,049 - root - INFO - Success criteria met. Exiting.

Hi Arthur,
I also checked the logs for a clock drift, but they are absolutely in sync. I don't know how to debug any further.
Best,
Tobias

Do you have an airflow scheduler running?

Yes:
[deploy@airflow ~] ps auxwww | grep scheduler
deploy 26073  0.0  0.0  16316  1912 10  R+J   5:35PM 0:00.00 grep scheduler
deploy 25719  0.0  0.2<PHONE_NUMBER>6 12  I+J   5:34PM 0:00.83 python: /usr/local/bin/python /usr/local/bin/airflow scheduler (python2.7)

Do I have to activate the tasks somehow? When I click on any of the 'Task Instances' view in the DAG I get a "Not Found" error

Oh the first problem is your start_date. The airflow scheduler triggers the schedule t after t + dag.schedule_interval. 2015-06-24 triggers >=2015-06-25.
The second problem idk, but if you run your web server in debug mode you can get a stack trace for me airflow webserver -d

Thank you so much! First (and major problem) is solved! I checked the code, but I simply overlooked that!
Regarding debug mode, when I try to start the webserver with the --debug flag I get a socket.error: [Errno 49] Can't assign requested address - starting it without it works flawlessly. Assigning another port via airflow webserver --debug -p 8050 results in the same error.
2015-06-24 18:59:18,153 - root - INFO - Filling up the DagBag from /home/deploy/bit.flow/dags
2015-06-24 18:59:18,182 - root - INFO - Importing /home/deploy/bit.flow/dags/pvi.py
2015-06-24 18:59:18,197 - root - INFO - Loaded DAG <DAG: pvi>
2015-06-24 18:59:18,197 - root - INFO - Importing /home/deploy/bit.flow/dags/tasks.py
2015-06-24 18:59:18,238 - root - INFO - Loaded DAG <DAG: tasks>
Starting the web server on port 8050 and host <IP_ADDRESS>.
2015-06-24 18:59:18,309 - werkzeug - INFO -  * Running on http://<IP_ADDRESS>:8050/ (Press CTRL+C to quit)
Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 4, in <module>
    __import__('pkg_resources').run_script('airflow==1.1.1', 'airflow')
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 735, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1652, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python2.7/site-packages/airflow-1.1.1-py2.7.egg/EGG-INFO/scripts/airflow", line 10, in <module>
    args.func(args)
  File "/usr/local/lib/python2.7/site-packages/airflow-1.1.1-py2.7.egg/airflow/bin/cli.py", line 241, in webserver
    app.run(debug=True, port=args.port, host=args.hostname)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 772, in run
    run_simple(host, port, self, **options)
  File "/usr/local/lib/python2.7/site-packages/werkzeug/serving.py", line 618, in run_simple
    test_socket.bind((hostname, port))
  File "/usr/local/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 49] Can't assign requested address

Do you get the same issue by using airflow webserver --debug -hn <IP_ADDRESS> -p 8050?

It looks like you might have something else tied to that port + address

@artwr Yes, I really don't want to sound like an idiot, but I cannot spot any process taking up this port in sockstat (before starting the webserver):
[deploy@consumer-jail-04 ~] sockstat -4 -l
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
deploy   python2.7  8752  3  tcp4   <IP_ADDRESS>:8793        *:*
deploy   python2.7  5854  7  tcp4   <IP_ADDRESS>:8383        *:*
root     sshd       95192 3  tcp4   <IP_ADDRESS>:22          *:*
nagios   nrpe2      95149 4  tcp4   <IP_ADDRESS>:5666        *:*
root     monit      95125 5  tcp4   <IP_ADDRESS>:2812        *:*
root     syslogd    95100 6  udp4   <IP_ADDRESS>:514         *:*

However, running airflow webserver --debug -hn <IP_ADDRESS> -p 8050 worked:
[deploy@host ~] airflow webserver --debug -hn <IP_ADDRESS> -p 8050

2015-06-24 19:53:48,237 - root - INFO - Filling up the DagBag from /home/deploy/bit.flow/dags
2015-06-24 19:53:48,266 - root - INFO - Importing /home/deploy/bit.flow/dags/pvi.py
2015-06-24 19:53:48,281 - root - INFO - Loaded DAG <DAG: pvi>
2015-06-24 19:53:48,281 - root - INFO - Importing /home/deploy/bit.flow/dags/tasks.py
2015-06-24 19:53:48,323 - root - INFO - Loaded DAG <DAG: tasks>
Starting the web server on port 8050 and host <IP_ADDRESS>.
2015-06-24 19:53:48,402 - werkzeug - INFO -  * Running on http://<IP_ADDRESS>:8050/ (Press CTRL+C to quit)
2015-06-24 19:53:48,405 - werkzeug - INFO -  * Restarting with stat

2015-06-24 19:53:49,035 - root - INFO - Filling up the DagBag from /home/deploy/bit.flow/dags
2015-06-24 19:53:49,130 - root - INFO - Importing /home/deploy/bit.flow/dags/pvi.py
2015-06-24 19:53:49,170 - root - INFO - Loaded DAG <DAG: pvi>
2015-06-24 19:53:49,170 - root - INFO - Importing /home/deploy/bit.flow/dags/tasks.py
2015-06-24 19:53:49,297 - root - INFO - Loaded DAG <DAG: tasks>
Starting the web server on port 8050 and host <IP_ADDRESS>.
2015-06-24 19:53:57,225 - werkzeug - INFO - <IP_ADDRESS> - - [24/Jun/2015 19:53:57] "GET /admin/taskinstanceview/?flt1_dag_id_equals=pvi&flt2_task_id_equals=midnight&sort=3&desc=1 HTTP/1.1" 404 -
2015-06-24 19:54:08,223 - werkzeug - INFO - <IP_ADDRESS> - - [24/Jun/2015 19:54:08] "GET /admin/taskinstanceview/?flt1_dag_id_equals=pvi&flt2_task_id_equals=midnight&sort=3&desc=1 HTTP/1.1" 404 -

Maybe it's a connected socket? sockstat -c ? It looks like the IP attached to the machine is <IP_ADDRESS>, maybe trying to tie it to <IP_ADDRESS> is the issue?
I am really more of newbie as far as FreeBSD and sockets :confused: .

@artwr good catch, thank you! I was able to get a stack trace, the error is the same for all of my DAGs, even the simplest one that only prints out something using a BashOperator is throwing the 404:
2015-06-25 08:00:48,072 - root - INFO - Importing /home/deploy/bit.flow/dags/dev.py
2015-06-25 08:00:48,072 - root - ERROR - Failed to import: /home/deploy/bit.flow/dags/dev.py
2015-06-25 08:00:48,072 - root - ERROR -
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/airflow-1.1.1-py2.7.egg/airflow/models.py", line 159, in process_file
    with utils.timeout(30):
  File "/usr/local/lib/python2.7/site-packages/airflow-1.1.1-py2.7.egg/airflow/utils.py", line 429, in __enter__
    signal.signal(signal.SIGALRM, self.handle_timeout)
ValueError: signal only works in main thread
2015-06-25 08:00:48,109 - werkzeug - INFO - <IP_ADDRESS> - - [25/Jun/2015 08:00:48] "GET /admin/airflow/code?dag_id=dev HTTP/1.1" 200 -
2015-06-25 08:00:48,146 - werkzeug - INFO - <IP_ADDRESS> - - [25/Jun/2015 08:00:48] "GET /static/d3.v3.min.js HTTP/1.1" 304 -
2015-06-25 08:00:48,148 - werkzeug - INFO - <IP_ADDRESS> - - [25/Jun/2015 08:00:48] "GET /static/dagre-d3.js HTTP/1.1" 304 -
2015-06-25 08:00:48,150 - werkzeug - INFO - <IP_ADDRESS> - - [25/Jun/2015 08:00:48] "GET /admin/static/vendor/bootstrap-daterangepicker/daterangepicker.js HTTP/1.1" 304 -
2015-06-25 08:00:48,152 - werkzeug - INFO - <IP_ADDRESS> - - [25/Jun/2015 08:00:48] "GET /admin/static/admin/js/form-1.0.0.js HTTP/1.1" 304 -
2015-06-25 08:00:49,262 - werkzeug - INFO - <IP_ADDRESS> - - [25/Jun/2015 08:00:49] "GET /admin/static/bootstrap/bootstrap3/fonts/glyphicons-halflings-regular.woff HTTP/1.1" 304 -

As a side note: Nothing was triggered tonight. The scheduler runs as expected, no error is visible in the logfiles.

When I run airflow test pvi midnight 2015-06-25 directly, it says the success criteria is met. Is there any debug option for the scheduler?
[deploy@consumer-jail-04 ~] airflow test pvi midnight 2015-06-25
2015-06-25 08:37:01,874 - root - INFO - Filling up the DagBag from /home/deploy/bit.flow/dags
2015-06-25 08:37:01,903 - root - INFO - Importing /home/deploy/bit.flow/dags/pvi.py
2015-06-25 08:37:01,917 - root - INFO - Loaded DAG <DAG: pvi>
2015-06-25 08:37:01,963 - root - INFO -
--------------------------------------------------------------------------------
New run starting @2015-06-25T08:37:01.963801
--------------------------------------------------------------------------------
2015-06-25 08:37:01,964 - root - INFO - Executing <Task(TimeSensor): midnight> for 2015-06-25 00:00:00
2015-06-25 08:37:01,964 - root - INFO - Checking if the time (00:00:00) has come
2015-06-25 08:37:01,964 - root - INFO - Success criteria met. Exiting.

I managed to get the DAG running by clearing everything, not sure why it was stuck and why there was no log output. Now it's done for yesterday, but todays run is never triggered.

The graph is working now. The start_date explanation really helped, thanks! I will dig into the code to find out why I get the 404 for every DAG "Task Instance" view.

I will open a new issue regarding this as soon as I have more information about it. Thank you!


feat: add missing questions

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[ ] I have tested these changes either locally on my machine, or GitPod.

Closes https://github.com/freeCodeCamp/fCC10/issues/47
Will wait on this until all the remaining scripts and questions are created and added.

It looks like the final css grid script has been added so those questions are ready

Looks like there's only one challenge left without questions, 6734e2dcb965e5ac0ea38e0f - the one assigned to Quincy.


[YamlCreate] Update minimum required version of Git

https://github.com/orgs/community/discussions/44687
https://github.blog/2023-01-17-git-security-vulnerabilities-announced-2/

Microsoft Reviewers: Open in CodeFlow

This can be postponed for a few days since v2.39.1 was released just yesterday.

The new version of Git addresses CVE-2022-41903, CVE-2022-23521, and CVE-2022-4152.

@Trenly I tried to add you as a reviewer and the UI wouldn't find you, so I'm mentioning you instead.

@denelon / @stephengillie - None of the CVE's fixed in the latest release really impact YamlCreate, as the Archive command is not used and the log command is not used. The other two could impact, but since the commit history of the .gitattributes file is controlled and clean, the effects would be local to a single user who exploits their own system. The last vulnerability isn’t an issue as there is no malicious executable to be run when cloning this repository - only if someone had a malicious fork and a user tried to clone that specific fork using git gui would it present an issue.
This is in contrast to the previous CVE (which is when the requirement for a minimum version of git was added to the script) where YamlCreate could be hosted in an non-user folder, resulting in the CVE having an impact
I'm okay with this being merged, as long as the minimum version of git referenced in YamlCreate (or newer) is present in the winget source, as the script will prompt the user to update using winget if possible

Should we move forward with this one at this point?

Should we move forward with this one at this point?

Sure


feat(docker): support remote multi-platform compilation on ci

Description
Support remote multi-platform compilation in order to push images in a single manifest with multiple architectures.
Tests performed

https://github.com/autowarefoundation/autoware/actions/runs/10828791104
Effects on system behavior

Not applicable.
Interface changes

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Updated the PR to its latest state, it can now build arm64 images remotely on aws runner.
If it will not exceed the 6 hours limit of standart job execution time than it will produce multi-architecture images on a single workflow run.

@oguzkaganozt It seems like pre-commit is failing. Could you fix your PR so that it passes the CI? (you can also test locally by running pre-commit run -a

After investigating the need of combined workflows which eventually leads to 6-hour runtime constraint on github runners, I am suggesting this solution which will produce the similar result without the need for upgrades.

After investigating the need of combined workflows which eventually leads to 6-hour runtime constraint on github runners, I am suggesting this solution which will produce the similar result without the need for upgrades.


Add NanoHTTPD

/gcbrun

/gcbrun

Given how small this PR is (9 lines!), it IMO makes sense to land a change that uses this new dependency in the same PR that pulls it in.
Otherwise you are leaving the codebase in an inconsistent state of pulling in unused dependencies. FWIW sometimes it makes sense to have slightly inconsistent codebase to get smaller PRs. Here however given this is 9 lines, you could have easily included these 9 lines in the PR first PR actually using NanoHTTPd.