Replace cpu_physical_memory_rw were possible

Using cpu_physical_memory_read, cpu_physical_memory_write and ldub_phys
improves readability and allows removing some type casts.

lduw_phys and ldl_phys were not used because both require aligned
addresses. Therefore it is not possible to simply replace existing
calls by one of these functions.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Stefan Weil 2011-04-10 18:23:39 +02:00 committed by Aurelien Jarno
parent b8b79323d0
commit 54f7b4a396
8 changed files with 19 additions and 21 deletions

View file

@ -120,7 +120,7 @@ static void glue(draw_hwc_line_, PIXEL_NAME)(SM501State * s, int crt,
/* get pixel value */
if (i % 4 == 0) {
cpu_physical_memory_rw(cursor_addr, &bitset, 1, 0);
bitset = ldub_phys(cursor_addr);
cursor_addr++;
}
v = bitset & 3;