src/mess/machine/atom.c
| r4399 | r4400 | |
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | | |
| 178 | | static DIRECT_UPDATE_HANDLER(atom_opbase_handler) |
| 179 | | { |
| 180 | | /* clear op base override */ |
| 181 | | memory_set_direct_update_handler(space, NULL); |
| 182 | | |
| 183 | | /* this is temporary */ |
| 184 | | /* Kees van Oss mentions that address 8-b are used for the random number |
| 185 | | generator. I don't know if this is hardware, or random data because the |
| 186 | | ram chips are not cleared at start-up. So at this time, these numbers |
| 187 | | are poked into the memory to simulate it. When I have more details I will fix it */ |
| 188 | | memory_region(space->machine, "maincpu")[0x08] = mame_rand(space->machine) & 0x0ff; |
| 189 | | memory_region(space->machine, "maincpu")[0x09] = mame_rand(space->machine) & 0x0ff; |
| 190 | | memory_region(space->machine, "maincpu")[0x0a] = mame_rand(space->machine) & 0x0ff; |
| 191 | | memory_region(space->machine, "maincpu")[0x0b] = mame_rand(space->machine) & 0x0ff; |
| 192 | | |
| 193 | | return cpu_get_pc( space->cpu ) & 0x0ffff; |
| 194 | | } |
| 195 | | |
| 196 | 177 | MACHINE_RESET( atom ) |
| 197 | 178 | { |
| 198 | 179 | atom_8255_porta = 0xff; |
| r4399 | r4400 | |
| 202 | 183 | timer_state = 0; |
| 203 | 184 | timer_pulse(machine, ATTOTIME_IN_HZ(2400*2), NULL, 0, atom_timer_callback); |
| 204 | 185 | |
| 205 | | memory_set_direct_update_handler(cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ),atom_opbase_handler); |
| 186 | /* this is temporary */ |
| 187 | /* Kees van Oss mentions that address 8-b are used for the random number |
| 188 | generator. I don't know if this is hardware, or random data because the |
| 189 | ram chips are not cleared at start-up. So at this time, these numbers |
| 190 | are poked into the memory to simulate it. When I have more details I will fix it */ |
| 191 | memory_region(machine, "maincpu")[0x08] = mame_rand(machine) & 0x0ff; |
| 192 | memory_region(machine, "maincpu")[0x09] = mame_rand(machine) & 0x0ff; |
| 193 | memory_region(machine, "maincpu")[0x0a] = mame_rand(machine) & 0x0ff; |
| 194 | memory_region(machine, "maincpu")[0x0b] = mame_rand(machine) & 0x0ff; |
| 206 | 195 | } |
| 207 | 196 | |
| 208 | 197 | struct atm |
src/mess/drivers/atom.c
| r4399 | r4400 | |
| 358 | 358 | SYSTEM_CONFIG_END |
| 359 | 359 | |
| 360 | 360 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 361 | | COMP( 1979, atom, 0, 0, atom, atom, 0, atom, "Acorn", "Atom" , GAME_NOT_WORKING) |
| 362 | | COMP( 1979, atomeb, atom, 0, atomeb, atom, 0, atom, "Acorn", "Atom with Eprom Box" , GAME_NOT_WORKING) |
| 361 | COMP( 1979, atom, 0, 0, atom, atom, 0, atom, "Acorn", "Atom" , 0) |
| 362 | COMP( 1979, atomeb, atom, 0, atomeb, atom, 0, atom, "Acorn", "Atom with Eprom Box" , 0) |