Merge pull request #172 from daniilfigasystems/ipod_touch_2g

Bugfix
This commit is contained in:
Martijn de Vos authored and GitHub committed 2024-07-31 09:30:34 +02:00
commit cae1b51a78
6 files changed
+13 -13

No files matched your search

+3 -3
View File
@@ -45,7 +45,7 @@ static void ipod_touch_lcd_write(void *opaque, hwaddr addr, uint64_t val, unsign
s->lcd_con = val;
break;
case 0xC:
s->unknown1 = val;
s->render = val;
qemu_irq_lower(s->irq);
// qemu_irq_raise(s->irq);
break;
@@ -168,9 +168,9 @@ static void refresh_timer_tick(void *opaque)
{
IPodTouchLCDState *s = (IPodTouchLCDState *)opaque;
if (s->unknown1 == 0x1)
if (s->render == 0x1)
qemu_irq_raise(s->irq);
else if (s->unknown1 == 0xFF)
else if (s->render == 0xFF)
qemu_irq_lower(s->irq);
timer_mod(s->refresh_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + NANOSECONDS_PER_SECOND / 85);//LCD_REFRESH_RATE_FREQUENCY);
+4 -4
View File
@@ -3,7 +3,7 @@
static uint64_t ipod_touch_mipi_dsi_read(void *opaque, hwaddr addr, unsigned size)
{
if (addr != 0x00000)
fprintf(stderr, "%s: read from location 0x%08x\n", __func__, addr);
fprintf(stderr, "%s: read from location 0x%08lx\n", __func__, addr);
IPodTouchMIPIDSIState *s = (IPodTouchMIPIDSIState *)opaque;
switch(addr)
@@ -25,7 +25,7 @@ static uint64_t ipod_touch_mipi_dsi_read(void *opaque, hwaddr addr, unsigned siz
case REG_FIFOCTRL:
return rDSIM_FIFOCTRL_EmptyHSfr;
default:
printf("%s: read invalid location 0x%08x.\n", __func__, addr);
printf("%s: read invalid location 0x%08lx.\n", __func__, addr);
break;
}
return 0;
@@ -34,7 +34,7 @@ static uint64_t ipod_touch_mipi_dsi_read(void *opaque, hwaddr addr, unsigned siz
static void ipod_touch_mipi_dsi_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
{
IPodTouchMIPIDSIState *s = (IPodTouchMIPIDSIState *)opaque;
fprintf(stderr, "%s: writing 0x%08x to 0x%08x\n", __func__, val, addr);
fprintf(stderr, "%s: writing 0x%08lx to 0x%08lx\n", __func__, val, addr);
switch(addr)
{
@@ -43,7 +43,7 @@ static void ipod_touch_mipi_dsi_write(void *opaque, hwaddr addr, uint64_t val, u
break;
case 0x00000008:
if (val == 0)
printf("turning off screen\n");
printf("turning off screen\n");
default:
break;
}
+1 -1
View File
@@ -199,7 +199,7 @@ static uint32_t ipod_touch_multitouch_transfer(SSIPeripheral *dev, uint32_t valu
s->out_buffer = (uint8_t *) s->next_frame;
}
else {
printf("%s Unknown command 0x%02x!", __func__, value);
printf("%s Unknown command 0x%02x!\n", __func__, value);
}
}
+1 -1
View File
@@ -146,7 +146,7 @@ static void ipod_touch_sdio_write(void *opaque, hwaddr addr, uint64_t value, uns
static uint64_t ipod_touch_sdio_read(void *opaque, hwaddr addr, unsigned size)
{
//printf("%s: offset = 0x%08x\n", __func__, addr);
printf("%s: offset = 0x%08x\n", __func__, addr);
IPodTouchSDIOState *s = (struct IPodTouchSDIOState *) opaque;
+2 -2
View File
@@ -2,7 +2,7 @@
static uint64_t ipod_touch_unknown1_read(void *opaque, hwaddr addr, unsigned size)
{
//fprintf(stderr, "%s: offset = 0x%08x\n", __func__, addr);
fprintf(stderr, "%s: offset = 0x%08x\n", __func__, addr);
switch (addr) {
case 0x140:
@@ -53,4 +53,4 @@ static void ipod_touch_unknown1_register_types(void)
type_register_static(&ipod_touch_unknown1_type_info);
}
type_init(ipod_touch_unknown1_register_types)
type_init(ipod_touch_unknown1_register_types)
+2 -2
View File
@@ -31,9 +31,9 @@ typedef struct IPodTouchLCDState
uint32_t w1_hspan;
uint32_t w1_display_depth_info;
uint32_t unknown1;
uint32_t render;
QEMUTimer *refresh_timer;
} IPodTouchLCDState;
#endif
#endif