It's an optimized implementation of the Midpoint circle algorithm. The wikipedia article describes the math behind it and gives some hints on how it can be changed to draw incomplete arcs. Sounds like a good C programming task!
Etiquette, expectations, entitlement...
@autoexec_bin | #magiclantern | Discord | Reddit | Server issues
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuTELNET=1
Connected to 192.168.1.116.
Escape character is '^]'.
Welcome to FlashAir
ESC R4161 built 16:20:27, Oct 6 2014
>
COMMAND=fdump 0x00C00000 -f fdump.dat -l 0x00100000
binutils-mep/bin/mep-objdump -D -b binary -mmep rom.bin
00000000 <.data>:
0: 08 d8 01 00 jmp 0x100
4: 18 df 08 00 jmp 0x8e2
8: 00 00 nop
a: 00 00 nop
c: 00 00 nop
...
fe: 00 00 nop
100: 00 70 di
102: 28 59 mov $9,40
104: 59 79 stc $9,$cfg
106: 00 59 mov $9,0
108: 58 79 stc $9,$rpe
10a: 03 eb a0 41 lw $11,(0x41a000)
10e: b5 cc 00 10 and3 $12,$11,0x1000
112: b5 cb 20 00 and3 $11,$11,0x20
116: 2a 6b srl $11,0x5
118: 5a 6c srl $12,0xb
11a: c0 1b or $11,$12
...
8e2: 48 df 08 00 jmp 0x8e8
8e6: 02 70 ret
8e8: f0 cf ac ff add3 $sp,$sp,-84
8ec: fa 00 sw $0,($sp)
8ee: 06 41 sw $1,0x4($sp)
8f0: 0a 42 sw $2,0x8($sp)
8f2: 0e 43 sw $3,0xc($sp)
8f4: 12 44 sw $4,0x10($sp)
8f6: 16 45 sw $5,0x14($sp)
8f8: 1a 46 sw $6,0x18($sp)
8fa: 1e 47 sw $7,0x1c($sp)
8fc: 22 48 sw $8,0x20($sp)
8fe: 26 49 sw $9,0x24($sp)
900: 2a 4a sw $10,0x28($sp)
902: 2e 4b sw $11,0x2c($sp)
904: 32 4c sw $12,0x30($sp)
906: 36 4d sw $tp,0x34($sp)
908: 3a 4e sw $gp,0x38($sp)
90a: 3e 4f sw $sp,0x3c($sp)
90c: 1a 71 ldc $1,$lp
90e: 42 41 sw $1,0x40($sp)
autoexec: $(ML_SRC_REBOOT_OBJ)
$(call build,LD,$(LD) \
-o $@ \
-e _start \
-N \
-Ttext $(AUTOEXEC_BASE) \
$^ \
--cref \
-Map=autoexec.map \
); \
$(READELF) -l magiclantern | $(GREP) -C 2 MemSiz
100D:FF6F47F0 BL unk_double_0x61584 ; [R0,R1] = f(R0,R1,R2,R3)
100D:FF6F47F4 STRD R0, [SP]
100D:FF6F47F8 ADR R2, "***** GuiUtilOlcData GUI_GetOlcTvForCode8def UniqueNum(%lf)"
100D:FF6F47FC MOV R1, #6
100D:FF6F4800 MOV R0, #131
100D:FF6F4804 BL DryosDebugMsg
src/fps-engio.c: float frame_duration_orig = 1000.0 / default_fps;
p1=&memtest; p3=UNCACHEABLE(p1);
init:00b1c75c:00:00: POINTER p1 p2 p3
init:00b1c77c:00:00: ADDRESS 0x00B7F204 0x10B7F204 0x40B7F204
init:00b1c7a8:00:00: (init) 0x00000123 0x00000123 0x00000123
init:00b1c7e0:00:00: memtest++ 0x00000124 0x00000123 0x00000123
init:00b1c818:00:00: (*p1)++ 0x00000125 0x00000123 0x00000123
init:00b1c850:00:00: (*p2)++ 0x00000125 0x00000123 0x00000123
init:00b1c888:00:00: (*p3)++ 0x00000125 0x00000124 0x00000124
0000fff0: ffff ffff ffff ffff ffff ffff ffff ffff ................
00010000: 0fff f000 0dcf 70f0 0000 0000 1d0f 70f0 ......p.......p.
00010010: 0000 0000 0040 3000 0000 0000 10c0 0000 .....@0.........
00010020: 0fff ffff f010 0000 10c0 0000 0fea fdcb ................
00010030: a080 0000 1180 0000 0000 0000 0000 0000 ................
00010040: 0000 0000 0000 0000 0020 0000 1180 0000 ......... ......
00000000: 4603 0080 342e 322e 3100 0000 0000 0000 F...4.2.1.......
00000010: 0000 0000 ffff ffff ffff ffff ffff ffff ................
00000020: ffff ffff ffff ffff ffff ffff ffff ffff ................
Quote from: a1ex on June 12, 2016, 12:47:44 PMIt'd be tricky to allocate 16MB(?) for the full flash wouldn't it? It would also be interesting to see how e.g. one 2kb read compares to two 1kb reads, maybe we just need to overlap the block reads by a few bytes and unshift them to make it work.
Guess we'll have to dump the RAM address where the serial flash contents is loaded (or maybe attempt to read the entire serial flash with a single call in the dumper).
set *0xCF999001 = *0xCF999001
[SF] InstallSerialFlash 6 0xc022c0d4 0xf0000000 0x1000000 1
unsigned int eos_handle_tio ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value )
{
unsigned int ret = 1;
const char * msg = 0;
int msg_arg1 = 0;
switch(address & 0xFF)
{
case 0x00:
if(type & MODE_WRITE)
{
if((value == 0x08 || value == 0x0A || value == 0x0D || (value >= 0x20 && value <= 0x7F)))
{
printf("\x1B[31m%c\x1B[0m", value);
return 0;
}
}
else
{
return 0;
}
break;
case 0x04:
msg = "Read byte: 0x%02X";
msg_arg1 = s->tio_rxbyte & 0xFF;
ret = s->tio_rxbyte & 0xFF;
while (ret == 0 || ret == EOF) {
ret = getchar();
}
return ret;
break;
case 0x08:
/* quiet */
return 0;
case 0x14:
if(type & MODE_WRITE)
{
if(value & 1)
{
msg = "Reset RX indicator";
s->tio_rxbyte |= 0x100;
return 0; /* nkls: quiet */
}
else
{
/* quiet */
return 0;
}
}
else
{
if((s->tio_rxbyte & 0x100) == 0)
{
msg = "Signalling RX indicator";
ret = 3;
}
else
{
/* quiet */
return 3; /* nkls: signal something on the line */
//return 2;
}
}
break;
}
io_log("TIO", s, address, type, value, ret, msg, msg_arg1, 0);
return ret;
}
FACTADJ
********** FACTORY ADJUSTMENT MENU VER 0.01 **********
0. Exit from Factory Adjustment
1. Leak Check
2. SDRAM Check
3. ROM Check
4. HDMI Check
5. Video Adjustment
6. ICU Version Check
7. Audio Check
8. Adjustment Data Display and Change
9. Check Flag Display and Initialization
A. ALL Check
B. ALLP Check
F. FROM ID Check
P. Power Domain Check
S. Serial Flash Check
V. Serial Flash Version Check
Z. Input_Device_Unique
S
Serial Flash Check.
346
Select OK or NG
V
SROM Version Check.
4.2.1
Select OK or NG
FROMUTILITY
************ FROMUTILITY MENU Ver 0.09 ************
[Type:346 Body:DC Revision:0.00]
0.Exit from FROM Menu
1.Erase Sector(0x20000)
2.Erase Chip
4.Write from card
5.Write from DRAM
6.Firm flag 0xF8000000 0x00000000 ON
7.Boot flag 0xF8000004 0x00000000 OFF
8.UpDate flag 0xF800000C 0xFFFFFFFF OFF
9.Create Boot Disk
A.Exec Program from card
B.ALL Block Unprotect
C.Connect card
G.Memory Dump
I.Write Data
J.Direct Jump
P.Power Domain
S.SROM Menu
U.Firm update
Z.RCbind.bin update
S
**** SROM(SIO6) Menu ****
0.Exit from SROM Menu
1.Erase Chip 0x01000000
2.Erase Block 0x0000F000
3.Erase Sector 0x00001000
4.Write Data
5.Write from Card
6.SROM Dump(SIO Read)
7.SROM Dump(QUAD Read)
8.Get Info
9.Get Version
8
8.Get Info 0x80000346
9
9.Get Version 4.2.1
ROM:FF0C0098 LDR R0, =sub_FFA9970C
ROM:FF0C009C LDR R1, =assert ; 0x1900
ROM:FF0C00A0 LDR R3, =unk_87690
ROM:FF0C00A4
ROM:FF0C00A4 loc_FF0C00A4 ; CODE XREF: firmware_entry+B0
ROM:FF0C00A4 CMP R1, R3 ; Copy initial RAM
ROM:FF0C00A4 ; 0x1900-0x87690
ROM:FF0C00A8 LDRCC R2, [R0],#4
ROM:FF0C00AC STRCC R2, [R1],#4
ROM:FF0C00B0 BCC loc_FF0C00A4
ROM:FF0C00B4 LDR R1, =0xC52E8
ROM:FF0C00B8 MOV R2, #0
Page created in 0.099 seconds with 13 queries.