Page 1 of 3

Custom Rom

PostPosted: 31 Dec 2011, 18:12
by justine
The custom rom option says 64K is that the maximum size ?
Can i just load an 8k rom image or do i have to make it 64K ?

Happy New Year :beer:

Re: Custom Rom

PostPosted: 31 Dec 2011, 19:02
by lvd
The reason is that ROM is only erasable in 64k blocks, so even if you want 1k ROM image, you have to erase total 64k. If flasher does not flash less than 64kb, just fill image up to 64kb with 0xFFs.

Re: Custom Rom

PostPosted: 31 Dec 2011, 20:13
by justine
Thankyou LVD , one more thing does it have to be 0xFFs or can it be 0x00s ?

Re: Custom Rom

PostPosted: 31 Dec 2011, 20:20
by нолька
erased = 0xff

Re: Custom Rom

PostPosted: 01 Jan 2012, 11:37
by DDp
some additions from http://www.nedopc.com/zxevo/rom/evo_reset_service.pdf

4. Updating FLASH ROM
...
Since version 0.46 is added feature updating user's "Custom ROM" by the size 64 KB. Order of pages in "Custom ROM": "Basic48", "TR-DOS", "Basic128", "Service". An obligatory condition - presence of 2 byte with codes #00, #C9 at offset #3D2F in "Service" page (the reset will be redirected into this page at an option choice "Custom ROM").
Updating is possible for whole ROM (512 kilobyte) or 64 kilobytes for "Custom ROM". Files panel will be displaying *.ROM file only is size 512K (in case whole ROM update) or 64K (in case "Custom ROM" update).
...
6. A choice of alternative ROM
...
Since version 0.46 is added feature of choice of user's "Custom ROM" (with independent update). The size of this ROM 64Кб. Order of pages in "Custom ROM": "Basic48", "TR-DOS", "Basic128", "Service". The reset will be redirected into "Service" page through entry point at offset #3D2F.
...


-------------
Oh, my English... :ohno:

Re: Custom Rom

PostPosted: 01 Jan 2012, 22:04
by lvd
Its better to fill up with 0xFF rather than 0x00, doing so you decrease programming time (since erased state is 0xFF) and decrease wear to flash IC.

Re: Custom Rom

PostPosted: 03 Jan 2012, 18:24
by justine
I'm trying to make a test rom 64k and i am using code supplied by others to try and put the evo nin text mode then print "A" at location x-20 , y-20 .
Why does this not work ?

Code: Select all
.ORG    $0000
   DI
   CALL settxtmode
   ld h,20   ;X cursor value
   ld l,20   ;Y cursor value
   call xy2txt_addr
   ld (hl),$41   ;Character A - 65
   HALT
settxtmode
      ld a,1   ;set shadow mode
      out ($BF),a
      ld bc,$ff77   ;set txt mode
      ld a,$26
      out (c),a
      ld a,5^$ff   ;set 5_ram_page to 1 bank z80
      ld bc,$77f7
      out (c),a
      ld a,1^$ff   ;set 1_ram_page to 2 bank z80
      ld b,$b7
      out (c),a
   xor a   ;close shadow ports
   out ($BF),a
   ret
   
xy2txt_addr   ;input h=x l=y symbol
      ld a,$07   ;output hl=address
   srl h
   jr nc,l1
   ld a,$87
l1     add a,l
     ld l,h
     ld h,a
     xor a
     srl h
     rr a
     srl h
     rr a
     add a,l
     ld l,a
     set 6,h
     ret
   
xy2attr_addr   ;input h=x l=y symbol
     ld a,$87    ;output hl=address
     srl h
     jr nc,l2
     ld a,$07
     inc h
l2     add a,l
     ld l,h
     ld h,a
     xor a
     srl h
     rr a
     srl h
     rr a
     add a,l
     ld l,a
     set 7,h
     ret

TXT2ATTR      ;input hl=txt_symb address
     ld a,%11100000      ;output hl=attr_symb address
     xor h
     ld h,a
     bit 5,h
     ret nz
     inc hl
     ret

   ; Fill rest of rom with $FF upto $FFFF
   .FILL $10000-$,$FF
        .END


Any help would be greatly appreciated.
I am compiling with tasm and saving the test.obj file as test.rom which is a 64k binary image.
I just see vertical lines and nothing else.

Re: Custom Rom

PostPosted: 03 Jan 2012, 19:23
by savelij
Сброс в custom rom производится в сервисную страницу. То есть этот код должен находится в rom по смещению $c000 от начала файла rom.

Re: Custom Rom

PostPosted: 03 Jan 2012, 19:43
by justine
savelij i think i am being stupid as i dont understand ?

I thought the custom rom was 64k in size and it would be loaded into the correct bank area of rom by the updater ?

Do i not just start code at $0000 ?

Anyway my code doesnt work i must be doing something very wrong.
Can anyone give me a code example to print some text in 80x25 mode for compiling into a custom 64k rom please ?

Re: Custom Rom

PostPosted: 03 Jan 2012, 20:02
by lvd
ROM page size is 16k, so there are 4 pages in 64kB custom rom.
At 0000-3FFF window there will be last 16k page from 64kb piece. So compile your code to begin at 0000, then move your binary to C000..FFFF part of 64kb rom image.