|
Post by tokra on Sept 26, 2018 18:37:17 GMT
I am trying to dump the Z80-BIOS-ROM from my particular machine (it's Dolphin DOS 3 and I want to check if it differs to the original Z80-BIOS). However apparantly you can only read the ROM from Z80-mode. I have never programmed Z80, so I have no idea how to do this. Can anyone here provide a quick example how to read the Z80-BIOS and copy it to RAM BANK 0 at $8000 for example? Thanks
|
|
|
Post by remark on Sept 27, 2018 15:08:12 GMT
I am trying to dump the Z80-BIOS-ROM from my particular machine (it's Dolphin DOS 3 and I want to check if it differs to the original Z80-BIOS). However apparantly you can only read the ROM from Z80-mode. I have never programmed Z80, so I have no idea how to do this. Can anyone here provide a quick example how to read the Z80-BIOS and copy it to RAM BANK 0 at $8000 for example? Thanks
ld hl,$2000 ; Pointer to the source ld de,$4000 ; Pointer to the destination ld bc,500 ; Number of bytes to move ldir ; Moves BC bytes from (HL) to (DE) And in C128 Internals from Abacus section 7.6 ,there is sample code to to switch from 6502 to z80, execute code and return.
|
|
|
Post by bjonte on Sept 27, 2018 15:20:16 GMT
And in C128 Internals from Abacus section 7.6 ,there is sample code to to switch from 6502 to z80, execute code and return. Ooh, I have to check that out.
|
|
|
Post by mirkosoft on Oct 1, 2018 11:44:08 GMT
Hm, code is valid, but how to get content of ROM? Better where is? Even needs it IN for read from ROM or not?
Miro
|
|
|
Post by willymanilly on Oct 2, 2018 23:18:15 GMT
Do you still need a program to do this? I should be able to write a quick and dirty program that will do the job for you if you haven't done so already. The Z80 part of the code will be very similar to what Remark has already provided.
|
|
|
Post by tokra on Oct 3, 2018 17:08:01 GMT
Thanks, I found a Z80-Monitor on Forum64.de - basically a program that provides access to the Z80 much like TEDMON does. With this I could save the BIOS-ROM.
|
|
|
Post by mirkosoft on Oct 4, 2018 6:39:14 GMT
Torsten, can you give the link to F64 Z80 monitor?
Miro
|
|
|
Post by tokra on Oct 4, 2018 15:51:46 GMT
|
|
|
Post by mirkosoft on Oct 4, 2018 23:40:35 GMT
Thank you Torsten, I have there account long long time.
Miro
|
|
|
Post by jmpff3d on Oct 25, 2018 20:42:23 GMT
The Z80 BootROM has been in the wild for a long time but I suppose there is still morbid pleasure in pulling it out from your own C-128 (or emu) without (eep)rom reader or hexeditor on crossdev machine. I have seen this topic come up again and again over the years, so I decided to do something about it. c-128.freeforums.net/thread/616/simple-bootrom-disassembly-comments-included(( EDIT: moverom.com available in this .d81 cp/m bootdisk - c-128.freeforums.net/thread/617/amped-128-zccp-zcpr-16m )) If you use CP/M, moverom.com by Herne Data Systems also copies the ROM for you. It doesn't use a straight LDIR approach as one would expect. Instead, it does this: ; all normal CP/M programs start at $0100
[...]
11 0F 00 LD DE, #$000F 0E 6D LD C, #$6D CD 05 00 CALL $0005 11 03 01 LD DE, #$0103 0E 09 LD C, #$09 CD 05 00 CALL $0005 11 00 00 LD DE, #$0000 0E 6D LD C, #$6D CD 05 00 CALL $0005 21 DC 05 LD HL, #$05DC ; copy pseudo-LDIR routine from source $05DC to destination $E000 11 00 E0 LD DE, #$E000 01 19 00 LD BC, #$0019 ED B0 LDIR ; ironically, normal LDIR setup and normal LDIR is used to copy the pseudo-LDIR routine
; this is moverom.com's Z80 BootROM copy routine. It is copied from $05DC to $E000 and executed at $E000. 21 00 00 LD HL, #$0000 ; source address start 11 00 40 LD DE, #$4000 ; destination address start 01 00 10 LD BC, #$1000 ; amount of bytes to be copied loop 32 01 FF LD ($FF01),A ; from A to preconf reg1 as buffer1 (why?) - initial A value doesn't seem to matter 7E LD A,(HL) ; from source to A 32 02 FF LD ($FF02),A ; from A to preconf reg2 as buffer2 (again, why? .. is there a CP/M reason for this?) 12 LD (DE),A ; from A to destination 23 INC HL ; increase source pointer -- this segment of code looks like a long "unrolled" form of LDIR. 13 INC DE ; increase destination pointer 0B DEC BC ; decrease bytecounter for copy length 78 LD A,B ; transfer highbyte of BC bytecounter to A B1 OR C ; OR A with lowbyte C of BC bytecounter 20 F1 JR NZ, loop ; if not = 0 .. branch back to preconf reg1 as buffer1 C9 RET ; return Cheers !
|
|